Sanel Zukan wrote:
> This is fix for 1.1.8 (current svn version) affecting gray images with alpha.
>
> In given versions, alpha compositor filled with grayscale image data will
> crash whole app yielding '*** glibc detected *** corrupted double-linked
> list: xxx'
> message.
>
> This is due loop who will overwrite memory node to the next allocated segment,
> so []delete will fail. And fix is:
>
> // void alpha_blend(...) Fl_Image.cxx
>
> if (img->d() == 2) {
> // Composite grayscale + alpha over RGB...
> // Composite RGBA over RGB...
> for (int y = H; y > 0; y--, srcptr+=srcskip)
> //for (int x = W; x > 0; x--, dstptr+=3) { <-- old
> for (int x = W; x > 0; x--) { <-- new
>
> srcg = *srcptr++;
> srca = *srcptr++;
>
> ...
>
> Before fix you can try it too; with gimp convert some png icon (for example
> from crystalsvg theme) to grayscale, retaining alpha channel. Openning it
> (eg. with FileChooser (Preview on)) will show crash.
>
> Also, gray images will be drawn correctly after above small fix.
Please file a bug report:
http://www.fltk.org/str.php
--
______________________________________________________________________
Michael Sweet, Easy Software Products mike at easysw dot com
Internet Printing and Publishing Software http://www.easysw.com
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev