comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Reducing eps file size for plots with overlaid images?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Reducing eps file size for plots with overlaid images? [message #92935] Wed, 30 March 2016 13:14 Go to next message
Brian Devour is currently offline  Brian Devour
Messages: 5
Registered: September 2012
Junior Member
Hi all,

So I'm making a plot that combines a contour plot with a bunch of overlaid image stamps. The output .eps file can be found here: https://drive.google.com/file/d/0BypAfPMk741Uenc1Sk03LUFvV1k /view?usp=sharing

My problem is that the file size is quite large, 2.2 MB, and it doesn't seem like it should *have* to be anywhere near this big, since the original image files that go into it are only 2 kb each (a total of 41 jpgs, 120x120 px each).

The code that creates this plot is pretty simple, and looks like the following:

set_plot, 'ps'
device, filename='ppr_fig6b.eps', /encapsul, /color, /inches, /xsize=6.7125, ysize=8.5375

<two cgcontour commands that create the background plots>

for i = 0, img_num-1 do begin
read_jpeg, <string() command that gives proper path/filename based on loop index>, cur_img_var, true=1
cgimage, cur_img_var, position=<complicated stuff based on loop index>, /keep_aspect_ratio, /interpolate, /noerase
endfor

<some cgtext commands for labels/etc>

device, /close
set_plot, 'x'

My assumption is that this results in an output .eps file with these images embedded in it in some kind of uncompressed bitmap format, hence the huge file size relative to the file sizes of the input image stamps. Is there any way to have IDL's output into the eps file be in some kind of compressed format like gif or jpg instead, or is this something IDL just can't do?
Re: Reducing eps file size for plots with overlaid images? [message #92936 is a reply to message #92935] Wed, 30 March 2016 13:26 Go to previous message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
On 03/30/2016 10:14 PM, Brian Devour wrote:
> Is there any way to have IDL's output into the eps file be in some
> kind of compressed format like gif or jpg instead, or is this
> something IDL just can't do?

You should have a look at the Coyote lib:
http://www.idlcoyote.com/documents/ps_programs.php

Also, I've had very good lossless compression results when converting an
eps to a pdf file.

Cheers,

Fabien
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: pick up Linux aliases in IDL
Next Topic: disk arc

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:36:25 PDT 2025

Total time taken to generate the page: 0.00549 seconds