Closed GoogleCodeExporter closed 8 years ago
Some additional information:
- Here is my test suite: https://github.com/ngryman/ribs/blob/master/test/unit/operations/open.js#L79. The commented tests fail.
- Here is where I use Leptonica to read images: https://github.com/ngryman/ribs/blob/master/src/image_decoder.cc#L146
Not that I also set l_pngSetStripAlpha(0) to support alpha, here:
https://github.com/ngryman/ribs/blob/master/src/image_decoder.cc#L41
Original comment by ngry...@gmail.com
on 8 Sep 2013 at 8:49
Ngry,
You've made a reasonable request. Support of colormaps in leptonica has
gradually been improved over the past few years. leptonica now supports all
the png alpha formats for reading, and handles images with alpha in a more
uniform and logical way: spp = 4 indicates a valid alpha channel, and this is
used in several operations, such as affine transforms.
There is no reason why we can't support the conversion to 32 bpp rgba. This
would take another flag, REMOVE_CMAP_WITH_ALPHA, for pixRemoveColormap(). And
it seems we'd need new functions: pixcmapGetRGBA(), pixcmapGetRGBA32() and
composeRGBAPixel(), in analogy with the existing 'Color' functions.
But note that the order of samples in the 32-bit word, as defined in pix.h, is
RGBA, not ARGB, for leptonica operations that depend on the byte order.
If you believe that would resolve your issue, I'll add this and send you a beta
1.70 distribution.
Original comment by dbloomb...@google.com
on 9 Sep 2013 at 12:15
Thanks for your quick response.
This would be awesome :)
Original comment by ngry...@gmail.com
on 9 Sep 2013 at 4:12
Just wanted to let you know that alpha support with colormaps has been
implemented and will go out in 1.70, around 20 Jan 14. You will be able to see
how it works in the regression test prog/alpha_ops.reg.
Thanks for the good suggestion.
Original comment by dan.bloo...@gmail.com
on 17 Jan 2014 at 1:42
1.70 is out. YOu can get it at: leptonica.org/download.html
Original comment by dan.bloo...@gmail.com
on 23 Jan 2014 at 8:50
Original issue reported on code.google.com by
ngry...@gmail.com
on 8 Sep 2013 at 8:43