[Image-SIG] bad RGBX conversions
by Kyler Laird other posts by this author
Jul 14 2002 11:17PM messages near this date
Re: [Image-SIG] compressed TIFF images
|
Re: [Image-SIG] PIL image resizing quality seems a little rough, any workarounds?
It appears that RGBX conversions aren't ready to use. I'm
not sure if it's of interest to anyone, but I don't have
time to debug it and I don't want my explorations to have
been a complete waste of time.
PIL seems to be able to convert from RGBX to GIF and JPEG.
Images converted to GIF are o.k. except red and blue are
swapped. This is contrary to the description of
"RGBX". 24-bit true colour, stored as (blue, green, red, pad).
Conversion to JPEG results in bad/no colors and the image
compressed horizontally, leaving black space on the right
side.
This conversion
image_data = image._data['data']
image_data_RGB = ''
for y in range(capture_height):
for x in range(capture_height):
pixel_position = ((y * capture_width) + x) * 4
image_data_RGB +=
image_data[pixel_position + 2] +
image_data[pixel_position + 1] +
image_data[pixel_position + 0]
makes the image data readable using "RGB" mode, but it
takes forever.
This is on a Debian unstable system using
python2.1-imaging-1.1.3-1-i386.
I'm moving on...
--kyler
_______________________________________________
Image-SIG maillist - Image-SIG@[...].org
http://mail.python.org/mailman/listinfo/image-sig
|