Author Topic: Processing Large Tiff Images  (Read 2992 times)

BarrySamuels

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • http://www.beenthere-donethat.org.uk
Processing Large Tiff Images
« on: November 07, 2005, 05:42:37 am »
I've had my Zaurus SL-C3100 for about 10 days now so I'm no Zaurus expert but one of the things I wanted it for was viewing images from my camera in the field. The camera creates 12MB TIFF images.

I thought that I would relate my experiences in case it may be of help to others.

My first thought was to find a version of ImageMagick that would run on the Zaurus and provide support for converting TIFF images to JPEG which could then be viewed with PhotoStorage which is included on the Zaurus.

I found a version here:  http://www.geocities.co.jp/SiliconValley-B...0/download.html

I installed it and yes it works and can read TIFF images, using libtiff, and convert to JPEG *but* it takes two and a half minutes for each 12MB image. This would mean waiting for 25 minutes for it to process a camera card containing 10 images which is, from my perspective, totally impractical so I uninstalled it. Incidentally using ImageMagick to reduce the size as well took considerably longer.

I then had a look at VisualQ (which also requires libtiff). This would take about 10 seconds to open a 12MB TIFF file which could then be reduced to 20% of it's original size and saved as a JPEG taking no more than another 10 seconds. 20 seconds in total with VisualQ compares very favourably with at least 150 seconds for ImageMagick.

Then I noticed a 'Batch' option on the VisualQ file menu. This enables you to specify a source directory with file type (TIFF) and a destination directory with file type (JPEG) and then takes you to the processing options where you can specify what processing is to be performed which, in my case, includes a reduction in size down to 20% of the original size. This just fits nicely in the PhotoStorage window which I use for viewing the results. Starting the Batch operation then processes all images in the source directory and saves the results in the destination directory. Total time for 10 images was about 3.5 minutes.

Wonderful!  

The only slight snag was that converting to JPEG takes you to a screen, which has not been translated from Japanese, which I imagine includes quality of the saved image as there was a box with 100% in it.

During processing the maximum amount of memory used was 52MB out of an available 62MB together with a small amount of swapfile usage so a swapfile seems like a good idea.
Barry Samuels
http://www.beenthere-donethat.org.uk
The Unofficial Guide to Great Britain

nilch

  • Hero Member
  • *****
  • Posts: 668
    • View Profile
    • http://
Processing Large Tiff Images
« Reply #1 on: November 07, 2005, 10:30:24 am »
Thanks a lot for posting this solution that you found.
Particularly since most of your questions about Imagemagick with TIFF support were unanswered - even I looked at it but had no idea about TIFF support - since I dont really use them.

But this batch operation in VisualQ is a good thing if its fast.
Generally for me Imagemagick does the job - but its just resizing and rotating operations on large JPEG files to start with.

If VisualQ is a good solution, I will keep that in mind, since I am planning to buy a digital SLR and I am looking for RAW support, so in the future I might need this solution myself.

Thanks
New no more-C1000 / 5000D (sold my 6000 and 750) | Cacko ROM 1.23 on C1000 | 256 MB CF | 2GB PNY SD card | Socket Networker WiFi CF Card | USB Host cable from StreamlineCPUS | Mini Microphone (for voice recording) |

pelon

  • Newbie
  • *
  • Posts: 18
    • View Profile
Processing Large Tiff Images
« Reply #2 on: November 09, 2005, 06:49:20 pm »
I use a Canon D20 that produces tiff images with the extention .cr2. I've never run into a program that did not recognize them as tiff. In VisualQ, in the information dialogue it says that the file is tiff. But no image appears (no errors are reported). The file size is reported correctly but the pixel width and height are reported as "0".  I've tried changing the extention to no avail. Any ideas?
pelon
hp200LX->hp200LXoverclocked->SL5500->C3000->

BarrySamuels

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • http://www.beenthere-donethat.org.uk
Processing Large Tiff Images
« Reply #3 on: November 10, 2005, 05:05:05 am »
Quote
I use a Canon D20 that produces tiff images with the extention .cr2. I've never run into a program that did not recognize them as tiff. In VisualQ, in the information dialogue it says that the file is tiff. But no image appears (no errors are reported). The file size is reported correctly but the pixel width and height are reported as "0".  I've tried changing the extention to no avail. Any ideas?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=103053\"][{POST_SNAPBACK}][/a][/div]

I had that same experience initially and I think that it was because the test image I was using was 'corrupted'.

I have TIFF images stored on my desktop and I also have a CompactFlash PCMCIA adapter for my laptop. Both computers are connected to my home network and I mount the desktop from my laptop using NFS. My mistake was that having copied an image from the desktop to the CF card in my laptop I then umounted my destop and then the CompactFlash card. As you probably know a copy of a large file is not necessarily completed until the receiving device is unmounted so, having unmounted my desktop, when the CF card was unmounted the copying couldn't be completed and only part of the TIFF image was left on the CF card. What I should have done is to unmount the CF card first then, when the unmount completed (and therefore the copy), unmount the desktop. I hope that all makes sense.

I then transferred the CF card to my Zaurus and this produced the effect, in VisualQ, that you describe although I have had no further problems since adopting the method previously described.

What size are your TIFF images?

Does this give you any clues?
Barry Samuels
http://www.beenthere-donethat.org.uk
The Unofficial Guide to Great Britain

Cresho

  • Hero Member
  • *****
  • Posts: 1609
    • View Profile
    • http://home.earthlink.net/~cresho/
Processing Large Tiff Images
« Reply #4 on: November 10, 2005, 05:40:48 am »
just let me know if you have problems with memory.  I have this program that enables swap memory on sd card.  Not found on the net anywhere and works really nice unless you preffer command lines.

I have used visual Q before and have encountered a few jpegs i was not able to view on my pda from pictures i have taken.  I was wondering which files you are using so i can try em out.

here is the file just incase.  read instructions carefully.
« Last Edit: November 10, 2005, 05:49:12 am by Cresho »
Zaurus C-3200 (internal 8gb seagate drive) with buuf icon theme, cacko 1.23 full,  and also Meanie's pdaxqtrom-Debian/Open Office
Zaurus SL-5500 Sharp Rom 3.13 with steel theme
pretec pocket pc wi fi
ambicom bt2000-cf bluetooth-made in taiwan
simpletech 1gb cf
pny 1gb sd
patriot 2gb
ocz or patriot 4gb sd(failed after 2 weeks)only on z
creative csw-5300 speakers in stereo
DigiLife DDV-1000 for video, Audio, Picture recording playable on the zaurus
Mustek DV4500-video recorder, pictures, voice record on sd for z

zaurusthemes.biz | ZaurusVideo | Zaurus Software

pelon

  • Newbie
  • *
  • Posts: 18
    • View Profile
Processing Large Tiff Images
« Reply #5 on: November 11, 2005, 10:25:42 am »
Quote
I had that same experience initially and I think that it was because the test image I was using was 'corrupted'.

...As you probably know a copy of a large file is not necessarily completed until the receiving device is unmounted so, having unmounted my desktop, when the CF card was unmounted the copying couldn't be completed and only part of the TIFF image was left on the CF card...

What size are your TIFF images?

Does this give you any clues?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=103083\"][{POST_SNAPBACK}][/a][/div]

I don't believe my tiff (.cr2) files are corrupted. They are directly from the CF card used in the camera and the tiff images open easily on my linux box.. JPGs from the same batch work just fine. As for memory, I use the memory applet and a 128MB swap file on my SD card.

The tiff files are around 8MB each.
pelon
hp200LX->hp200LXoverclocked->SL5500->C3000->

BarrySamuels

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • http://www.beenthere-donethat.org.uk
Processing Large Tiff Images
« Reply #6 on: November 11, 2005, 12:15:23 pm »
Quote
I don't believe my tiff (.cr2) files are corrupted. They are directly from the CF card used in the camera and the tiff images open easily on my linux box.. JPGs from the same batch work just fine. As for memory, I use the memory applet and a 128MB swap file on my SD card.

The tiff files are around 8MB each.

I've just tried a set of 10 TIFF files on a CF card in my Zaurus and VisualQ had no problems in opening them. My files are 12MB each and my swap file is only 64MB on /hdd3 so you shouldn't really have any memory problems with smaller files and a larger swap.

If you could let me have a copy of one of your files I'll try it here. Can you arrange an FTP download or send it by email?
Barry Samuels
http://www.beenthere-donethat.org.uk
The Unofficial Guide to Great Britain