473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

TIFF compression & transfer

Hello, we have an app that scans documents into TIFF format and we
need to transfer them over the internet. If anyone knows of a SDK we
can use that can compress TIFFs on the fly or even if it can compress
them so they take up less space on the server, would be appreciated.

Actually any info on handling tiff files programatically would be
appreciated as I know very little about tiffs.

TIA

G
Nov 18 '08 #1
3 7479
GiJeet,

Well, you would want to look at the classes in the System.Drawing
namespace for classes to work with manipulating the TIFF (specifically, the
Bitmap class).

To compress the image for storage, you can look at the classes in the
System.IO.Compression namespace.

- Nick

"GiJeet" <gi****@yahoo.comwrote in message
news:5c**********************************@f37g2000 pri.googlegroups.com...
Hello, we have an app that scans documents into TIFF format and we
need to transfer them over the internet. If anyone knows of a SDK we
can use that can compress TIFFs on the fly or even if it can compress
them so they take up less space on the server, would be appreciated.

Actually any info on handling tiff files programatically would be
appreciated as I know very little about tiffs.

TIA

G
Nov 18 '08 #2
On Tue, 18 Nov 2008 06:02:28 -0800, GiJeet <gi****@yahoo.comwrote:
Hello, we have an app that scans documents into TIFF format and we
need to transfer them over the internet. If anyone knows of a SDK we
can use that can compress TIFFs on the fly or even if it can compress
them so they take up less space on the server, would be appreciated.

Actually any info on handling tiff files programatically would be
appreciated as I know very little about tiffs.
What kind of compression are you looking for?

You can use the GzipStream class to compress arbitrary data. But,
depending on your original TIFF, it may not compress much, if at all.
That is, if it's already in a compressed form (TIFF supports a variety of
compression methods), additional compression may not help, and even if
it's not, GzipStream isn't optimized for image compression.

You can use the classes in the System.Drawing.Imaging namespace to do
things like read the TIFF in as an Image instance and then save that Image
instance back to a file or stream in a different format. If the format
has to remain as a TIFF, your ability to compress it may be limited or
non-existent, unless it's permissible to actually change the image
itself. In that case, you could "compress" the image simply by reducing
its resolution, by creating a smaller Bitmap instance and copying the
original to the smaller one before saving it from the smaller one (halving
each dimension will result in a 4x reduction in size simply from that
process alone).

If the format doesn't need to remain as TIFF, then you also can try using
PNG (lossless) or JPEG (lossy) output. Unfortunately, .NET doesn't have
much elaborate support for PNG and so you won't necessarily get the
optimal compression out of it, but at least it will do some compression.
With JPEG you can control the compression/quality setting, which as long
as it's permissible to modify the image data in the process of compression
can produce very good compression results.

But first, you need to figure out what it means to "compress" the data and
what requirements you have with respect to preserving the original image
data.

Pete
Nov 18 '08 #3
Are you using any of the headers in a TIFF file? Is it nonstandard in
any way? If it's just an image convert it to JPG if it is a photo or
PNG if it is not. TIFF is old, lame, and on its way out as far as a
generic image format is concerned. The GIS folk do a lit with custom
TIFF layers. If that's not you, just convert it and be done. I can't
see any good reason to use a gzip compression on a TIFF.
Nov 19 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Maurice Mertens | last post by:
Hello, I'm having troubles with saving a tiff-file with a certain compression and colordepth. This is the code I use: ----------------------------------------------------------------------...
3
by: 246C57AE-40DD-4d6b-9E8D-B0F5757BB2A8 | last post by:
Hi. Why can't I read TIFFs compressed by JPEG using GDI+ Image class? I always get out of memory exception. Thanx.
0
by: Will Arrowsmith | last post by:
Hi All, I am trying to create a .tiff file to fax using the windows fax service FAXCOMLib. I have created an array of images (bitmaps) and converted them to 1pbb format in order to allow...
0
by: Will Arrowsmith | last post by:
Hi All, I am aiming to create a multiframe Tiff file that I can fax using the windows fax service FAXCOMLib. I have created an array of Bitmaps (pages I want in my fax doc) and succesfully...
1
by: Stedak | last post by:
I have the following class I use to save Tiff's. The problem I have with it is that the final size of the images are very large. If we scan directly to a file the final tiff may be 600-900 kb.s but...
0
by: Stedak | last post by:
We are scanning images and saving them as TIFF's in a database. We are running into some problems because in the creation of the TIFF the EncoderValue.CompressionLZW is ignored. It does not seem to...
7
by: Ben | last post by:
Hi We are looking for a component that offers that offers the below for Tiff files: Image clean-up (deskew, despeckle) Printing capabilities from VB The ability to add text to image, e.g....
10
by: =?Utf-8?B?UmludSBHb3BhbGFrcmlzaG5hIFBpbGxhaQ==?= | last post by:
Hi, Please help me to write a dll in C# , that will read each pages of a tiff image from a file and a memory stream object ( need two ways) and creatre a new tiff image object.The dll should...
1
by: BuncyTheFrog | last post by:
Working in C# in Visual Studio 2005 So I know how to edit TIFF tags (get a propertyItem object, edit its details, and stick it into a bitmap), but saving them is presenting itself as a problem. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.