Note that there are some explanatory texts on larger screens.

plurals
  1. POOptimizing TIF and EPS files with PHP
    text
    copied!<p>Are there any PHP libraries out there that will reduce the size of an EPS or TIF file? Or create one with a reduced size in the first place?</p> <p>I have seen some sites that have automated TIF and EPS generation and produce significantly smaller file sizes than I can and their quality is the same (to my eye anyway).</p> <p>I have tried with ImageMagick on the Linux command line but it doesn't appear to have any specific optimize ability for these formats.</p> <p>Thanks for any help you folks can offer.</p> <p><strong>Edit:</strong></p> <p>I'm trying to optimize someone else's code and haven't used ImageMagick before so am learning it as I go. @Dagon, are you sure it doesn't have TIF support built in? I could totally be misunderstanding things but it appears to convert JPG's to TIF's as is. But you're definitely right about EPS, I see now that the code is using InkScape to create the EPS files.</p> <p>Anyway, I have found if I tell it to use the ZIP compression a TIF's file size it is reduced significantly. Example: <code>convert mypic.jpg -compress zip mypic.tif</code></p> <p>Does anyone have any idea if there are drawbacks to doing this? The program is a bar code image creator so there's not a lot of image data I'm worried about losing as the images are quite basic. They're coming out clean looking which is what matters to me.</p> <p>As for the EPS files, it appears the EPS generated by another site is done so with a different program than Inkscape. Their EPS generator is specifically made for bar codes. I don't know much about the EPS format, but it appears they make theirs significantly smaller by defining a few rules at the top since they know what they're making every time. Where as Inkscape keeps things vague since it could be used to make any kind of vector.</p> <p>So I guess I have found my answers. If anyone has anything to add or point out what I have dead wrong it's still appreciated.</p> <p>Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload