ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> image-sig
image-sig
[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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved