AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
May 2010

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2010.05.08 18:39 "Merge several TIFFG4 images", by Oliver Geisen
2010.05.10 04:04 "Merging multiple Group4 compressed TIFF files", by Richard Nolde
2010.05.11 07:00 "Merging multiple Group4 compressed TIFF files", by Oliver Geisen
2010.05.11 15:22 "Re: Merging multiple Group4 compressed TIFF files", by Bob Friesenhahn
2010.05.11 16:59 "Combining multiple G4 images into a single output image", by Richard Nolde
2010.05.11 17:33 "Re: Combining multiple G4 images into a single output image", by Oliver Geisen
2010.05.11 19:15 "Re: Combining multiple G4 images into a single output image", by Olivier Paquet
2010.05.12 16:47 "Re: Combining multiple G4 images into a single output image", by Bob Friesenhahn

2010.05.10 04:04 "Merging multiple Group4 compressed TIFF files", by Richard Nolde

1. Merge several TIFFG4 images (Oliver Geisen)
> Hello,
>
> i need to write a tool using libtiff which is able to paste 1 to 10 G4
> compressed bilevel TIFF images onto a large (17300x27051 pixel) image
> and save this as G4 compressed image also. The images to be pasted
> onto the canvas are different in size, but much smaller.
>    
You aren't clear about the sizes of your input images and the desired 
arrangment of them in the output image. You might look at some of the 
export options available in Tiffcrop to see if they will meet your need, 
eg -e combined  will merge multiple input selections into one output 
image if the selections are from the same input image with some 
restrictions.  To merge vertically, the width of the selections must 
match, to merge horizontally, the length of the selections must match. I 
doubt that this is what you are describing however.  To merge multiple 
selections of different sizes to different locations in a single output 
image, you are going to have to calculate all the offsets ahead of time 
and do some significant memory management and/or disk thrashing as the 
entire width of the image will have to be in memory before you can write 
out any one scanline unless you build it up in multiple passes adding 
one image each time.

All the issues of bit shifting that you describe are handled in 
tiffcrop.  You might consider contributing to tiffcrop rather than 
reinventing the wheel. Other list members might have additional ideas.

Richard
> Now i wonder if it is best to create the big image in memory and write
> the data of each image to be placed in turn into this memory block, or
> process it line by line.
> Libtiff itself seems not to provide any image functions itself, but it
> is the only lib i found which can handle G4 TIFFs natively without
> converting it into an internal colorspace (which makes them impossible
> to handle because they grow to several GB in memory).
> What i need is some advice how to start this. One big problem for me
> is bit-shifting. If an image to be placed does not start on a byte
> boundary, i need to shift all pixels (bits) of a row, line by line.
> This may take a long time and i really don't know how to code this
> efficiently in C.
> The tool must be very very fast, so i merging does not take longer
> than several seconds.
>
> Any help is appreciated here!
>
>
> ------------------------------
>
> _______________________________________________
> Tiff mailing list
> Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
>
> End of Tiff Digest, Vol 72, Issue 4
> ***********************************
>
>