Git Product home page Git Product logo

Comments (9)

otaviofcs avatar otaviofcs commented on July 3, 2024

one way to fix this is to extend the scope of prawn-fast-png to handle all png settings, not only the alpha channel extraction.

from prawn.

practicingruby avatar practicingruby commented on July 3, 2024

Yes, that would address at least some of these issues. But then maybe prawn-fast-png would need a more general name… prawn-png-improved ?

Anyway, that’s a question for Wojtek, not me. So feel free to contact him if you want to see if he’s interested.

from prawn.

yob avatar yob commented on July 3, 2024

I've fixed this in my png_fixes branch, plus add some new specs

from prawn.

wpiekutowski avatar wpiekutowski commented on July 3, 2024

I was thinking about delegating all PNG handling to RMagick. That would probably give compatibility with any PNG format out there. In that case a name change may be appropriate somewhere in the future. I think it shouldn't be too complicated to rewrite prawn/images/png.rb with RMagick. Unfortunately I'm kind of busy currently and I can't pursue this on my own. Probably in May I'll have more time to try this approach.

from prawn.

yob avatar yob commented on July 3, 2024

I'd imagine replacing Prawn::Images::PNG with a RMagick based version shouldn't be too hard. It's not like it does much.

I'm not sure how Greg feels, but I think that'd be great as an optional prawn plugin. I'd be keen to keep mainline prawn pure ruby if possible. I use c extensions in projects, but sometimes it's nice to be able to weight up the various pros and cons.

ie. faster and more format support vs. possible memory issues and reduced platform compatibility.

from prawn.

wpiekutowski avatar wpiekutowski commented on July 3, 2024

By 'rewrite prawn/images/png.rb with RMagick' I meant to monkey patch Prawn::Images::PNG though a separate gem, like now prawn-fast-png deals with alpha channel separation performance.

from prawn.

yob avatar yob commented on July 3, 2024

Oh, in that case, sweet! :)

from prawn.

practicingruby avatar practicingruby commented on July 3, 2024

yeah, right on, a RMagick based Prawn PNG is a good workaround for our bottleneck, but should be done as an extension gem.

Let us know when you have something.

from prawn.

yob avatar yob commented on July 3, 2024

Only unfilter PNG files after we check for compatible types (Closed by 1f6b2fe)

from prawn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.