On Fri, 6 Jan 2012 23:53:27 +0100
André Wobst <[email protected]> wrote:
> Hi William,
>
> Am 06.01.2012 um 23:24 schrieb William Hudspeth:
>> Thank you for responding. When I try to use the PIL
>>method with the
>> following code:
>>
>>
>> import PIL
>> c=canvas.canvas()
>> metpics='image.jpg'
>> metpic=PIL.Image.open(metpics)
>> mx,my=metpic.size
>> bm_metpic=bitmap.bitmap(144,280,metpic,width=mx*unit.x_pt,height=my*unit.x_pt)
>> c.insert(bm_metpic)
>>
>>
>>
>> I get the error:
>>
>> "implementation limited to 8 bit per component only"
>>
>> from the line:
>>
>> metpic=PIL.Image.open(metpics)
>
> Can you send us the full traceback? PyX should not be
>involved in this line. Can you give any details about the
>image? For example the output of the identify tool from
>the imagemagick package (run "identify image.jpg" at the
>shell prompt).
>
> Best,
>
>
> André
>
> --
> by _ _ _ Dr. André Wobst, Amselweg 22, 85716
>Unterschleißheim
> / \ \ / ) [email protected],
>http://www.wobsta.de/
> / _ \ \/\/ / PyX - High quality PostScript and PDF
>figures
> (_/ \_)_/\_/ with Python & TeX: visit
>http://pyx.sourceforge.net/
>
Thanks for looking at this:
The Traceback:
/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py
in get_response
response = callback(request,
*callback_args, **callback_kwargs)
Local vars
/home/wilbur/IOM/iom_catalog/views.py in buildQueryCatalog
metpics='/home/wilbur/IOM/site_media/images/metpic_combined2.jpg'
iom_logo='/home/wilbur/IOM/site_media/images/
institute_horizontal.jpg'
unm_logo='/home/wilbur/IOM/site_media/images/UNM Logo Sp
Vert
Color.jpg'
iom = PIL.Image.open(iom_logo)
metpic = PIL.Image.open(metpics)
unm = PIL.Image.open(unm_logo)
nx, ny = iom.size
mx, my = metpic.size
ux, uy = unm.size
bm_iom = bitmap.bitmap(36, 765, iom,
width=nx*unit.x_pt,height=ny*unit.x_pt)
bm_metpic = bitmap.bitmap(144, 280, metpic,
width=mx*unit.x_pt,height=my*unit.x_pt)
Local vars
/usr/lib/pymodules/python2.6/pyx/bitmap.py in __init__
raise ValueError("implementation
limited to 8 bit per component only")
Local vars
-------------------------------------------------------------------
There are three images I am trying to insert...running
identify for
each gives:
metpic_combined2.jpg JPEG 324x324 324x324+0+0 8-bit
DirectClass 40.7KiB
0.000u 0:00.000
institute_horizontal.jpg JPEG 540x18 540x18+0+0 8-bit
DirectClass
3.22KiB 0.000u 0:00.000
UNM Logo Sp Vert Color.jpg JPEG 4000x2100 4000x2100+0+0
8-bit
DirectClass 1.57MiB 0.000u 0:00.000
Thanks
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user