[IPOL discuss] original files, filenames in templates and make -j [Fwd: Re: Questions publication Ipol LSD]

Nicolas Limare nicolas.limare at cmla.ens-cachan.fr
Thu Dec 9 15:26:28 CET 2010


> I would like to keep the actual original file, and not a
> copy of the original image in other format.
> Can't we just save the file, with its original name?

We don't know the original name. We receive an "undescribed file" a
set of bits, without any info about the original filename or its
format or MIME type.

Then demo tries to read it with the Python Imaging Library. If
successful, it was an image; it is saved as input_N.png. If it
couldn't be read, then it was not a (supported) image file, and it the
user gets an error message.

Theoretically, it is possible, once the file has been successfully
read by Python, to know the image format. Then we could save the file
under a name matching this format. But In fact we must not save the
loaded image data into a new file, because some settings (JPEG
compression, for example) would not be the same; we must rename the
original file with an extension matching its type.

And for some image formats, keeping the original format is very
space-inefficient; ascii pgm is HUGE, uncompressed tiff is a waste of
space, ..., so we should decide, for each of these files, how to
optimize them, losslessly.

Finally, keeping the original file format means another variable to
hold the file name (input_0.orig.png, input_0.orig.jpeg,
input_0.orig.pgm, ...)

To me, it sounds like feature creep, for a very little benefit over
the simplistic and robust "everything goes PNG".

> We can add a symbolic link to it with a standard name,
> something like "input_0_orig", so then  in the archive
> page we can use that link to be able to refer to it
> in the web page.

Symbolic link is Unix-centric, so using links means we drop Windows
support.

-- 
Nicolas LIMARE
http://nicolas.limare.net/                         pgp:0xFA423F4F
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://tools.ipol.im/mailman/archive/discuss/attachments/20101209/ca0d04fe/attachment-0001.pgp>


More information about the discuss mailing list