I need to convert 32 bit Windows bitmaps to jpgs with PHP.
I used the function from http://groups.google.com/groups?
hl=en&lr=&ie=UT F-8&oe=UTF-8&safe=off&selm =a164f4b5.03113 02128.40fb37f4%
40posting.googl e.com to convert bitmaps to jpgs.
It works very well for my 24 bit bitmaps, but I cannot figure out how
to
get it to work with 32 bits. I tried adding an additional scan line
and
the image appears in the correct size, but the colors are way off and
some of the data is missing. I also tried putting $a in different
places within the $gd_scan_line string:
This did not work:
$b = $scan_line{$j++ };
$g = $scan_line{$j++ };
$r = $scan_line{$j++ };
$a = $scan_line{$j++ };
$gd_scan_line .= "\x$a$r$g$b ";
Can anyone help?
Ken
I used the function from http://groups.google.com/groups?
hl=en&lr=&ie=UT F-8&oe=UTF-8&safe=off&selm =a164f4b5.03113 02128.40fb37f4%
40posting.googl e.com to convert bitmaps to jpgs.
It works very well for my 24 bit bitmaps, but I cannot figure out how
to
get it to work with 32 bits. I tried adding an additional scan line
and
the image appears in the correct size, but the colors are way off and
some of the data is missing. I also tried putting $a in different
places within the $gd_scan_line string:
This did not work:
$b = $scan_line{$j++ };
$g = $scan_line{$j++ };
$r = $scan_line{$j++ };
$a = $scan_line{$j++ };
$gd_scan_line .= "\x$a$r$g$b ";
Can anyone help?
Ken
Comment