Opening TIFF and HPGL files using Python PIL getting IO Errors

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Opening TIFF and HPGL files using Python PIL getting IO Errors

Satya Gundapaneni

Hi,

 

I am new to Python.

I have a requirement to extract some portion of the image and save that portion.

After some investigation in net I found out that Python and PIL has the capability to crop and the image and save that image to different file.

 

But the problem I am facing is  I am not able to open TIFF and HPGL files.

 

When I try to open TIFF images I am getting  “IOError: decoder group4 not available

While opening HPGL images I am getting “IOError: cannot identify image file

 

Will I be able to open TIFF and HPGL files in PIL or not? All my images are in either TIFF or HPGL formats.

 

Appreciate your help.

 

 

Regards,

Satyanarayana Gundapaneni

Zimmer Inc.

1800 W  Center St.

Warsaw, IN 46580
Mailto: [hidden email]

Work - 574 267 6131 Xtn 12749


_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|

Re: Opening TIFF and HPGL files using Python PIL getting IO Errors

Edward Cannon
HPGL is a vector format used for old HP printers, PIL doesn't open
vector art, so no help there, you need a separate converter to turn it
into a raster format. look at
http://www.pythonware.com/library/pil/handbook/format-tiff.htm for
more information about loading tiff files in PIL.

On Mon, Aug 16, 2010 at 6:51 AM, Satya Gundapaneni
<[hidden email]> wrote:

> Hi,
>
>
>
> I am new to Python.
>
> I have a requirement to extract some portion of the image and save that
> portion.
>
> After some investigation in net I found out that Python and PIL has the
> capability to crop and the image and save that image to different file.
>
>
>
> But the problem I am facing is  I am not able to open TIFF and HPGL files.
>
>
>
> When I try to open TIFF images I am getting  “IOError: decoder group4 not
> available”
>
> While opening HPGL images I am getting “IOError: cannot identify image file”
>
>
>
> Will I be able to open TIFF and HPGL files in PIL or not? All my images are
> in either TIFF or HPGL formats.
>
>
>
> Appreciate your help.
>
>
>
>
>
> Regards,
>
> Satyanarayana Gundapaneni
>
> Zimmer Inc.
>
> 1800 W  Center St.
>
> Warsaw, IN 46580
> Mailto: [hidden email]
>
> Work - 574 267 6131 Xtn 12749
>
> _______________________________________________
> Image-SIG maillist  -  [hidden email]
> http://mail.python.org/mailman/listinfo/image-sig
>
>
_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|

Re: Opening TIFF and HPGL files using Python PIL getting IO Errors

Sebastian Haase-3
Satya,
maybe you can ask here:
http://pypi.python.org/pypi/Chiplotle
and let us all know what you got ... ;-)

Good luck,
Sebastian Haase



On Tue, Aug 17, 2010 at 11:55 PM, Edward Cannon
<[hidden email]> wrote:

> HPGL is a vector format used for old HP printers, PIL doesn't open
> vector art, so no help there, you need a separate converter to turn it
> into a raster format. look at
> http://www.pythonware.com/library/pil/handbook/format-tiff.htm for
> more information about loading tiff files in PIL.
>
> On Mon, Aug 16, 2010 at 6:51 AM, Satya Gundapaneni
> <[hidden email]> wrote:
>> Hi,
>>
>>
>>
>> I am new to Python.
>>
>> I have a requirement to extract some portion of the image and save that
>> portion.
>>
>> After some investigation in net I found out that Python and PIL has the
>> capability to crop and the image and save that image to different file.
>>
>>
>>
>> But the problem I am facing is  I am not able to open TIFF and HPGL files.
>>
>>
>>
>> When I try to open TIFF images I am getting  “IOError: decoder group4 not
>> available”
>>
>> While opening HPGL images I am getting “IOError: cannot identify image file”
>>
>>
>>
>> Will I be able to open TIFF and HPGL files in PIL or not? All my images are
>> in either TIFF or HPGL formats.
>>
>>
>>
>> Appreciate your help.
>>
>>
>>
>>
>>
>> Regards,
>>
>> Satyanarayana Gundapaneni
>>
>> Zimmer Inc.
>>
>> 1800 W  Center St.
>>
>> Warsaw, IN 46580
>> Mailto: [hidden email]
>>
>> Work - 574 267 6131 Xtn 12749
>>
>> _______________________________________________
>> Image-SIG maillist  -  [hidden email]
>> http://mail.python.org/mailman/listinfo/image-sig
>>
>>
> _______________________________________________
> Image-SIG maillist  -  [hidden email]
> http://mail.python.org/mailman/listinfo/image-sig
>
_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|

Re: Opening TIFF and HPGL files using Python PIL getting IO Errors

Dean Allen Provins, P. Geoph.
Satya:

On Wed, Aug 18, 2010 at 12:28:27AM +0200, Sebastian Haase wrote:
> Satya,
> maybe you can ask here:
> http://pypi.python.org/pypi/Chiplotle
> and let us all know what you got ... ;-)
>
> Good luck,
> Sebastian Haase

I recommend "hp2xx" to read, display and convert to other formats,
your HP-GL files.  It does an excellent job, and I use it regularly.
It will convert to several other vector and some raster formats.  I use
it to convert to Postscript (actually EPS).

Go to "http://www.gnu.org/software/hp2xx/" to read about it, and
to obtain a copy.  If you are a Linux user, it may also be
available for your distribution (it certainly is for Debian).

Regards,

Dean


> On Tue, Aug 17, 2010 at 11:55 PM, Edward Cannon
> <[hidden email]> wrote:
> > HPGL is a vector format used for old HP printers, PIL doesn't open
> > vector art, so no help there, you need a separate converter to turn it
> > into a raster format. look at
> > http://www.pythonware.com/library/pil/handbook/format-tiff.htm for
> > more information about loading tiff files in PIL.
> >
> > On Mon, Aug 16, 2010 at 6:51 AM, Satya Gundapaneni
> > <[hidden email]> wrote:
> >> Hi,
> >>
> >>
> >>
> >> I am new to Python.
> >>
> >> I have a requirement to extract some portion of the image and save that
> >> portion.
> >>
> >> After some investigation in net I found out that Python and PIL has the
> >> capability to crop and the image and save that image to different file.
> >>
> >>
> >>
> >> But the problem I am facing is  I am not able to open TIFF and HPGL files.
> >>
> >>
> >>
> >> When I try to open TIFF images I am getting  ?IOError: decoder group4 not
> >> available?
> >>
> >> While opening HPGL images I am getting ?IOError: cannot identify image file?
> >>
> >>
> >>
> >> Will I be able to open TIFF and HPGL files in PIL or not? All my images are
> >> in either TIFF or HPGL formats.
> >>
> >>
> >>
> >> Appreciate your help.
> >>
> >>
> >>
> >>
> >>
> >> Regards,
> >>
> >> Satyanarayana Gundapaneni
> >>
> >> Zimmer Inc.
> >>
> >> 1800 W  Center St.
> >>
> >> Warsaw, IN 46580
> >> Mailto: [hidden email]
> >>
> >> Work - 574 267 6131 Xtn 12749
> >>
> >> _______________________________________________
> >> Image-SIG maillist  -  [hidden email]
> >> http://mail.python.org/mailman/listinfo/image-sig
> >>
> >>
> > _______________________________________________
> > Image-SIG maillist  -  [hidden email]
> > http://mail.python.org/mailman/listinfo/image-sig
> >
> _______________________________________________
> Image-SIG maillist  -  [hidden email]
> http://mail.python.org/mailman/listinfo/image-sig
>
>

--
                           Dean Provins, P. Geoph.
                         [hidden email]
                  KeyID at at pgpkeys.mit.edu:11371: 0x9643AE65
          Fingerprint: 9B79 75FB 5C2B 22D0 6C8C 5A87 D579 9BE5 9643 AE65
_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|

Re: Opening TIFF and HPGL files using Python PIL getting IO Errors

Stani-2
In reply to this post by Satya Gundapaneni
For group4 compressed tiff files you can preprocess them  first with
tiffcp to uncompressed tiff files which PIL can open. Tiffcp exists
for all platforms (sudo apt-get install libtiff-tools on Ubuntu).

On Mon, Aug 16, 2010 at 3:51 PM, Satya Gundapaneni
<[hidden email]> wrote:

> Hi,
>
>
>
> I am new to Python.
>
> I have a requirement to extract some portion of the image and save that
> portion.
>
> After some investigation in net I found out that Python and PIL has the
> capability to crop and the image and save that image to different file.
>
>
>
> But the problem I am facing is  I am not able to open TIFF and HPGL files.
>
>
>
> When I try to open TIFF images I am getting  “IOError: decoder group4 not
> available”
>
> While opening HPGL images I am getting “IOError: cannot identify image file”
>
>
>
> Will I be able to open TIFF and HPGL files in PIL or not? All my images are
> in either TIFF or HPGL formats.
>
>
>
> Appreciate your help.
>
>
>
>
>
> Regards,
>
> Satyanarayana Gundapaneni
>
> Zimmer Inc.
>
> 1800 W  Center St.
>
> Warsaw, IN 46580
> Mailto: [hidden email]
>
> Work - 574 267 6131 Xtn 12749
>
> _______________________________________________
> Image-SIG maillist  -  [hidden email]
> http://mail.python.org/mailman/listinfo/image-sig
>
>



--
Phatch Photo Batch Processor - http://photobatch.stani.be
SPE Python IDE - http://pythonide.stani.be
_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig