Re: tiff to eps [message #53651] |
Fri, 27 April 2007 07:23 |
Carsten Lechte
Messages: 124 Registered: August 2006
|
Senior Member |
|
|
Mike Chinander wrote:
> prompt> ls -l rose.eps
> -rw-r--r-- 1 user group 8272 Apr 26 14:18 rose.eps
>
> Only 8272 bytes.
And that is mostly caused by the overhead of coding binary data into
printable characters.
chl
|
|
|
Re: tiff to eps [message #53662 is a reply to message #53651] |
Thu, 26 April 2007 12:19  |
mchinand
Messages: 66 Registered: September 1996
|
Member |
|
|
In article <1S6Yh.6$25.138@news.uchicago.edu>,
Mike Chinander <mchinand@midway.uchicago.edu> wrote:
> In article <MPG.209ab4667a64d0a0989f62@news.frii.com>,
> David Fanning <news@dfanning.com> wrote:
>> David Fanning writes:
>>
>>> I would guess it depends entirely on how big you want
>>> the PostScript image to be. Why don't you try it and
>>> see? It is only a couple of commands:
>>>
>>> Read_JPEG, filename, image
>>> Set_Plot, 'PS'
>>> Device, /color, bits=8, /encap, xsize=5, ysize=3.5, /inches
>>> TVImge, image
>>> Device, /Close
>>
>> Well, lots of good non-IDL solutions. But in my little
>> test, using the rose.jpg file from the IDL distribution.
>> I got a file that weighed in at a hefty 204 KBytes. :-)
>>
>
> Considering that rose.jpg is only 5756 bytes, that's quite an increase.
>
> prompt> ls -l rose.jpg
> -rw-r--r-- 1 xfs users 5756 Jun 29 2005 rose.jpg
Forgot to include the comparison to using jpeg2ps
prompt> jpeg2ps /usr/local/packages/rsi/idl_6.2_i586/examples/data/rose.jpg > rose.eps
Note on file '/usr/local/packages/rsi/idl_6.2_i586/examples/data/rose.jpg ': 227x149 pixel, 3 color
components
prompt> ls -l rose.eps
-rw-r--r-- 1 user group 8272 Apr 26 14:18 rose.eps
Only 8272 bytes.
--Mike
|
|
|
Re: tiff to eps [message #53664 is a reply to message #53662] |
Thu, 26 April 2007 12:14  |
mchinand
Messages: 66 Registered: September 1996
|
Member |
|
|
In article <MPG.209ab4667a64d0a0989f62@news.frii.com>,
David Fanning <news@dfanning.com> wrote:
> David Fanning writes:
>
>> I would guess it depends entirely on how big you want
>> the PostScript image to be. Why don't you try it and
>> see? It is only a couple of commands:
>>
>> Read_JPEG, filename, image
>> Set_Plot, 'PS'
>> Device, /color, bits=8, /encap, xsize=5, ysize=3.5, /inches
>> TVImge, image
>> Device, /Close
>
> Well, lots of good non-IDL solutions. But in my little
> test, using the rose.jpg file from the IDL distribution.
> I got a file that weighed in at a hefty 204 KBytes. :-)
>
Considering that rose.jpg is only 5756 bytes, that's quite an increase.
prompt> ls -l rose.jpg
-rw-r--r-- 1 xfs users 5756 Jun 29 2005 rose.jpg
|
|
|
Re: tiff to eps [message #53665 is a reply to message #53664] |
Thu, 26 April 2007 13:07  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> I would guess it depends entirely on how big you want
> the PostScript image to be. Why don't you try it and
> see? It is only a couple of commands:
>
> Read_JPEG, filename, image
> Set_Plot, 'PS'
> Device, /color, bits=8, /encap, xsize=5, ysize=3.5, /inches
> TVImge, image
> Device, /Close
Well, lots of good non-IDL solutions. But in my little
test, using the rose.jpg file from the IDL distribution.
I got a file that weighed in at a hefty 204 KBytes. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
Re: tiff to eps [message #53667 is a reply to message #53666] |
Thu, 26 April 2007 10:49  |
Foldy Lajos
Messages: 268 Registered: October 2001
|
Senior Member |
|
|
On Thu, 26 Apr 2007, ebertf@gmx.de wrote:
> Hi,
> is there a simple way to convert a tiff or Jpg Picture into encapsuled
> postscript using IDL without blowing up the size (1MB -> 20 MB That
> usually happens when using Corel Draw). I want to include the
> postscript into Latex Code. ( For example a fotograph.)
> Thanks for ideas!
> Regards
> Florian
>
You can use pdflatex, which can include JPEG images natively.
regards,
lajos
|
|
|
Re: tiff to eps [message #53668 is a reply to message #53667] |
Thu, 26 April 2007 10:31  |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Thu, 26 Apr 2007 09:56:11 -0700, ebertf wrote:
> Hi,
> is there a simple way to convert a tiff or Jpg Picture into encapsuled
> postscript using IDL without blowing up the size (1MB -> 20 MB That
> usually happens when using Corel Draw). I want to include the
> postscript into Latex Code. ( For example a fotograph.)
The problem is most conversion tools put raw uncompressed data in the
postscript file, which is a big waste (but was the only way to do it
in PS level 1). Others are better, e.g. tiff2ps from the libtiff
library, or imgtops. Arxiv.org gives some recommendations for
avoiding the "bloat":
http://arxiv.org/help/bitmap/software#imgtops
I believe Level 2 postscript can wrap compressed JPEG data directly.
http://imgtops.sourceforge.net/
has more info.
JD
|
|
|
Re: tiff to eps [message #53669 is a reply to message #53668] |
Thu, 26 April 2007 10:28  |
Jo Klein
Messages: 54 Registered: January 2006
|
Member |
|
|
Hi Florian,
Postscript isn't a good format for raster data. It only has limited
support for data compression. In Level 2, LZW compression can be used,
but this is not implemented by many converters (due to now obsolete
patent issues, amongst other reasons). Thus, file size will usually
increase significantly when you convert from lossy formats, such as jpg.
You can try free converters, such as imconv and convert, to see if they
produce smaller PS files, I'm not sure if any of those support compression.
Hope this helps,
Jo
|
|
|
Re: tiff to eps [message #53670 is a reply to message #53669] |
Thu, 26 April 2007 11:17  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
ebertf@gmx.de writes:
> is there a simple way to convert a tiff or Jpg Picture into encapsuled
> postscript using IDL without blowing up the size (1MB -> 20 MB That
> usually happens when using Corel Draw). I want to include the
> postscript into Latex Code. ( For example a fotograph.)
I would guess it depends entirely on how big you want
the PostScript image to be. Why don't you try it and
see? It is only a couple of commands:
Read_JPEG, filename, image
Set_Plot, 'PS'
Device, /color, bits=8, /encap, xsize=5, ysize=3.5, /inches
TVImge, image
Device, /Close
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|