[TYPO3-dev] Creating an image-processing framework

Andreas Wolf ng at nospam.andreaswolf.info
Wed Nov 15 16:55:57 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> The idea is not new. Generally I think that it is a good idea, but I could
> never solve one issue: the optimizing of multiple operations.
Ok, this could perhaps be done by creating some sort of "transactions" on
images:

1) start transaction (copy file to temporary, lossless (?) format)
2) do all modifications to this temporary image
3) finish transaction, copy it back

Maybe it would be reasonable to create some sort of action-cache which
caches all operations to be done and optimizes them before execution (e.g.,
first make the image smaller, then rotate, as rotating smaller images is
faster)

> Do you go for quality (always use best service) or speed (use only one
> when possible, preferrably in memory like GD or with on exec and long
> argument list)? 
That depends, I think - no clear answer here: when processing images
on-the-fly, I would go for speed. If the response-time of the whole process
doesn't really matter (or is at least not as critical as
on-the-fly-processing), I would choose the best quality, as long as it does
not make processing too expensive (in terms of memory and processing time).
So there should perhaps be a (set of) parameter(s) to choose the
quality/speed-ratio, right? Haven't thought of that yet, I must admit...
Or you need to determine the order of the services by your needs in terms of
speed/quality - which means a "dynamic" reordering of services, or two
separate lists, one for best quality, one for best speed.

> Note that you should not group the services around file formats but image
> operations. It might make sense to convert the input file into an internal
> format do some processing and then convert it to the output format. The
> real types are based on the used colour-depth and the use of palettes
> (indices).
Hm, but the problem is that e.g. GD is not capable of processing PDFs,
right? Ok, this could be solved by checking the filetype in the service -
so no real problem. Regarding the conversion to an internal format: Doesn't
ImageMagick have something that's called MIFF or something as such an
internal format? This could perhaps be used, at least within a transaction
I described at the beginning of this post.

Andreas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFFWziSwA09wjioC/0RAjRWAJ90Y/Gve2FsBlf7NqNfStNoWpQRywCg/tik
m02FgKIZfCV5lZEQ2AeHJSQ=
=4ReY
-----END PGP SIGNATURE-----




More information about the TYPO3-dev mailing list