Comments (9)
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.
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.
I've fixed this in my png_fixes branch, plus add some new specs
from prawn.
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.
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.
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.
Oh, in that case, sweet! :)
from prawn.
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.
Only unfilter PNG files after we check for compatible types (Closed by 1f6b2fe)
from prawn.
Related Issues (20)
- No way to give dynamic-height bounding boxes a background color HOT 1
- Incompatibility with ruby 3.1 HOT 1
- "Cursor" with repeater dynamic not working HOT 3
- Error in the manual? (page 11) HOT 2
- Issue with image colors when converting to PDF HOT 1
- Question about re-using some Prawn code to render appearance streams for AcroForm annotations HOT 2
- Push New Version to Ruby Gems to Deal with Ruby 3.1 Removing Matrix HOT 6
- Setting multi page table top margin
- Does this gem support chartjs?
- PDF/A-1
- PDF/A-3
- Rails 7.X ActionView::Base.full_sanitizer.sanitize(Prawn::Text::NBSP) returns " " HOT 1
- [FR] OpenType Support, Enable/Disable Ligatures and Multiple weight settings HOT 8
- Subtable with colspan and multi-line text breaks across pages
- Grid broken if no gutter defined HOT 5
- TypeError: can't convert nil into Float HOT 1
- The Return of the Embedded Font Issue HOT 13
- Font error with 2.5 and Adobe Acrobat HOT 4
- Circular require warning in prawn 2.5.0
- Question / Feature Request: Is it possible to layout text into a fixed number of rows?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prawn.