Reducing eps file size for plots with overlaid images? [message #92935] |
Wed, 30 March 2016 13:14  |
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?
|
|
|