Thread

Posted on Fri Jul 7 12:32:38 2006 by leegee
Low-ish level scanline interface?
I was excited to see the Imager development page mention the following "TODO" item: "implement methods that allow access to the low level scanline function (mostly done - still need palette index access)" The dev page hasn't been updated for the current version, but could you please tell me how far this has progressed, and whether it is/will be possible to not just skip scanlines but skip 'columns' of iamge data...? It is a while since I looked at doing this in lib jpeg, but I do remember running out of patience. Is it impossible...? Thanks, lee
Direct Responses: 2591 | Write a response
Posted on Fri Jul 7 13:06:02 2006 by tonyc in response to 2590
Re: Low-ish level scanline interface?

The low level scanline interface was implemented, though access to palette indexes for paletted images wasn't.

The scanline interface exists but I'm not sure what you're expecting, it doesn't provide access to the file data, but to Imager's image data, wherever the image came from.

You can certainly, for example, make two calls to getscanline() to get the left and right ends of a scanline of an image.

If you can give me some idea of what you're trying to do maybe I can be more help.

That TODO page is seriously out of date, the Future Plans page is more up to date, though I admit I haven't done anything on the large sample support.

Direct Responses: 2592 | Write a response
Posted on Fri Jul 7 13:27:32 2006 by leegee in response to 2591
Re: Low-ish level scanline interface?
Ah, I was thinking of JPEG scanlines. But thanks for the offer of help/info: perhaps you could point me in the right direction? There are times when I need to produce thumbnails from multiple terabytes of data, thousands upon thousands of JPEGs, each up to three meg in size. So I was thinking about producing a faster thumbnailer: in a bitmap image, I'd just build a thumbnail by sampling every n'th byte. I thought I could hack the JPEG library to process only every n'th scanline (easy enough I thought) but I seem to remember the scanlines were compressed. In hindsight this doesn't make much sense for an effective compression algorithm - why restart compression for every line? Have you noticed that (amongst others) the Picassa JPEG renderer initially shows a rough image - I think even for non-interlaced images? This encourages me, perhaps incorrectly, to assume it is somehow doing what I want. Hm.... did that express anything other than my current tiredness? Cheers! lee
Direct Responses: 2593 | Write a response
Posted on Fri Jul 7 13:54:06 2006 by tonyc in response to 2592
Re: Low-ish level scanline interface?

Unfortunately, JPEG doesn't compress by line but by 8 x 8 pixel blocks, and the output from that stage is then also compressed, at least as I understand it, so to get your output you're going to have to decompress everything anyway.

Imager doesn't provide any access to the file at this level, you might be able to convince libjpeg to give you some information about each block before it converts it to pixels, but it's not something likely to ever be supported by Imager.

Direct Responses: 2594 | Write a response
Posted on Fri Jul 7 14:09:18 2006 by leegee in response to 2593
Re: Low-ish level scanline interface?
I suspected so much - it was the similarity in terminology that got me all worked up! 8x8 pixel blocks.... Perhaps that's linked to the interlacing? If I could take an average of those blocks, it might speed things up.... Thanks and good luck with the project - *very* impressive and *very* welcome pakage - thanks. Lee
Write a response