Temporary files size

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Doezer
Posts: 2
Joined: 2014-03-03T04:49:41-07:00
Authentication code: 6789

Temporary files size

Post by Doezer »

Hello,

We're working on a project using multiple processes called filters (basically you pass a file to a filter and it treats it then gives you a file). Several filters of these use temporary files for their treatments. Adding to that, it's aimed to be used by multiple people (50-100) so we are more than likely to have multiple people using the same filter at the same time.
Given we're using one server for all these people, all the temporary files are located on it.

We use IM to convert TIFFs to PDFs (with some TIFFs having more than 100 pages). The resolution of these TIFFs is more than 4500x7000 so we have +250mo temporary files for each page (we use the Q16 version) and for each time the filter is executed. For a 150 pages TIFF, you get +35go of temporary files (which are, of course, wiped at the end). This can become a problem if, as I said earlier, you have, say, 5 people using this filter at the same time (without even thinking about other filters).

What are the way to reduce the size of these files?

Thank you.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Temporary files size

Post by snibgo »

Have you tried "-compress XXX" where XXX is Zip or some other option?
snibgo's IM pages: im.snibgo.com
Doezer
Posts: 2
Joined: 2014-03-03T04:49:41-07:00
Authentication code: 6789

Re: Temporary files size

Post by Doezer »

Thank you for your answer.

To answer your question: Yes, but the thing is that this is the end file that will be impacted.

We need it to be the temporary files. Do I understand that there's no way of reducing this size, apart maybe by taking the Q8 (and so on) version?
How is the number of channels configured? (as in the formula temporary_file_size=width*height*bits/8*channels)

If I wanted another way, I guess in the end it would be resumed to resizing the original TIFF file before converting it to a PDF file (which in fact doesn't solve anything).
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Temporary files size

Post by snibgo »

Ah, the temporary "magick*" files that IM creates? I don't know how to influence their sizes. I guess that Q8 will be smaller, but that's just a guess.
snibgo's IM pages: im.snibgo.com
Post Reply