IIPImage

denix
denix's picture

Joined: 2005-12-19
Posts: 13
Posted: Mon, 2005-12-19 11:21

Hi all,
I was thinking about the opportunity to add IIPImage http://iipimage.sourceforge.net to gallery to visualise very large images. I already did an experiment with tftgallery. you can see the results applied to a shot of 2000x3000 pixels on my site at http://www.pitzalis.org/tftgallery-0.10-denix/.
If you think this can be a nice idea, let me know so I can start developing ;)

Cheers,
Denix

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-12-19 11:56

what exactly would you use it for?
since IIPImage mainly needs the IIPImage server, which is a fastcgi, the installation instructions for such a module would be quite involving.
also, how would such a module compare to existing G2 functionality (thumnail / resize creation)?
would this module be used similarely to the panoramaapplet module? e.g. enable IIPImage for an album / for an item and then the user can use the IIPImage applet to view the image? that would be cool, i guess.
and how would the IIPImage server interact with g2? i guess the server needs images from G2, that's it. so probably, the request to the IIPServer which comes from the browser just includes the image URL and not a file name meaning that the IIPImage server would download the image via http, which seems to be quite inefficient. but maybe, there's a better way to communicate / integrate.

 
denix
denix's picture

Joined: 2005-12-19
Posts: 13
Posted: Mon, 2005-12-19 19:00

As digital cameras are capable of bigger and bigger photos, viewing a gallery of large images is a strain on the network (especially if you are still on a 56Kb connection!) and indeed your web browser. The IIPImage system uses tiled pyramidal images which can be transparently created during an image upload (currently only TIFF, but soon JPEG).

You don't need dynamic resizing using gd, which will be slow and heavy on the server for large images. If you look at my example, you can see that thumbnails and medium size images can be exported very efficiently with minimal server overhead ;)

Unfortunately I didn't find an example of how the panorama module works ... and obviously IIPImage is not for an end user with no experience of webserver configuration ;) Also the server does not have to upload anything from G2, the client merely has to supply the image file system path.

IIPImage could simply be another option, like gd2, gd1 or imagemagick ;) and it is totally independent of gd or similar. The system is even efficient with image of several gigabytes in size ... hehehe ... if you look at the IIPImage website, the world map demo is 43000x21500 pixels ... and you can surf it in real time ... the user can also choose to use either the javascript client or the applet (a new improved version of the applet will be out soon and will let the user do more interesting things with the image).

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-12-19 20:09

just to recap if i understand you correctly:
the principle of progressive download isn't new. some image formats have this built-in, some applications (google earth, nasa whirlwind, ...) do it on the application level too.

so IIPImage does something like that and other things too. and from your numbers, it sure looks like a good fit for G2 and it seems to be powerful.

Also:
- IIPImage generates its special image format for each image once.
- Each client request is then "answered" using the special tiled pyramide image and not with the original input image

is that correct?

note that G2 runs GD, imagemagick or netpbm once per file and the resulting thumbnail / resize is stored on disk. so there's no compared overhead when handling browser requests for resized images or so.
but back to IIPImage.

So an IIPImage module would
a) register a image toolkit for the mimetypes that it can handle
--> when images are added to g2 IIPImage can create its pyramid format images from the original
b) a IIPImagePhotoItem entity (see modules/panorama/module.inc performFactoryRegistrations()
--> users get the IIPImage applet (the same way you get a panorama applet for panorama images if the panorama module is active and used for an image)

@fastcgi:
fastcgi is sure something that won't be easy to install. but with precompiled static binaries for windows/linux/freebsd, we can have pretty straight forward instructions.

i'd welcome a IIPImage module for g2, so please ask when you have questions. and i'm sure there will be a lot of questions since g2 lacks in docs quite badly.

for the toolkit part, please look at existing toolkits: modules/gd/, imagemagick (complicated), netpbm (also quite complicated), ffmpeg, zipcart, dcraw, ...

for the entity registration / applet rendering part, please check out the module/panorama because it's really similar. it's a java applet that fetches an image from g2 and has some mini controls to let the user scroll the panorma 360° . your applet will do the same (get an url as applet parameter, fetch the url from g2 and then do its display work).

see:
http://gallery.menalto.com/node/36885#comment-134279

http://codex.gallery2.org/index.php/Gallery2:Development_Concepts

http://codex.gallery2.org/index.php/Gallery2:Coding_Standards

http://codex.gallery2.org/index.php/Gallery2:Coding_Guidelines

 
denix
denix's picture

Joined: 2005-12-19
Posts: 13
Posted: Sun, 2008-08-17 02:09

Finally, with some delay, the module is done! more info here