 |
|
 |
Hi,
How can I save many sperated Tiffs to one Multipage-Tiff in colour?
I am using now your source-code.. but I don't know how to change it exactelly.
I have removed the Bitonal function.. but the Tiff is still black and white.
If there is a possibility to render this tiffs to a mulitpage tiff black/white, but with an good resolution, please let me know
Regards,
Z
|
|
|
|
 |
|
 |
Now, another question.
We are going to VS2010, compiling to 4.0.
Are there other, newer ways in VS2010 to do this.
Thanks so much.
|
|
|
|
 |
|
 |
I was having a hard time saving 32bpp images to CCITT4 and then realized I needed them to be bitonal. That in turn let me to this article and your conversion method. It works great and it's fast, thanks!
|
|
|
|
 |
|
 |
Hi,
I have implement the above mentioned logic in my asp.net demo project, but some time i get the following error Out of memory. Error in saving as multipage.
Please suggest the possible cause of the exception and what setting at IIS level will prevent the same.
|
|
|
|
 |
|
 |
It can be 3 things:
- You really don't have enough memory to that instance of Image;
- You are using a version of .Net 1.1 without Service Pack 1 for it(yes, its was a public microsoft error)
- You are trying to work with some Methodos of GUID+ who don't support work with Bitonal files.
Well. One day i got this exception too... and wasn't relly lack of memory, cuz i was with 1gb+ memory free.
I just converted the image back to RGB, just while i work with it. When i gon save, i convert back to Bitonal.
|
|
|
|
 |
|
 |
I need a way to set the dithering of the produced TIFF. compression is CCCITT G4. I figured out how to alter the DPI and that works perfectly. However the text of the document is not crisp nor fully clear. Almost jagged in spots. Is there a way to fix this with this library? Awesome work btw. I almost have satisfied the requirements. Appreciate any insight into this.
JLeger
|
|
|
|
 |
|
 |
Excatly what I was looking for and the code is logical, straightforward and easy to follow.
|
|
|
|
 |
|
 |
Thanks For Such A nice article,
I am also making a project which split the Tiff file .I am showing each page in a panel.Its working fine with small page size.But when page is more than 200 than it will give Out of memory or CoWaitForMultipleHandles error .
What can I do for removing these errors.
Thanks
|
|
|
|
 |
|
 |
Its really nice article
**
How to possible in VC++???
Thanks
|
|
|
|
 |
|
 |
Hello, bijulsoni. I use a code that was suggested by sooge - I removed a bi-tonal convertion and using it without any conversion - works fine! So thanks for this article. But still have a question - how can I set a custom DPI for the output multitiff? Thank you
|
|
|
|
 |
|
 |
There's a partial answer on the "parent" process that does the Bitonal conversion.
What you can do is to add code to the end of the Bitonal conversion (in this case, 200 DPI):
destination.SetResolution(200, 200)
'// Return
Return destination
End Function
Bitonal (TIFF) Image Converter for .NET[^]
ChuckLepie:
Hello,
In your line of code:
source = new Bitmap(original.Width, original.Height, PixelFormat.Format32bppArgb);
It saves the image as 96dpi regardless of the actual dpi of the image, resulting in image viewers/libraries rendering it incorrectly. If you add:
source.SetResolution(original.HorizontalResolution, original.VerticalResolution);
immediately afterwards, all is well, i.e. when saving a 200dpi image, it used to class it as 96dpi, when with the code above it saves it as 200dpi.
|
|
|
|
 |
|
 |
FYI, I would use the DPI as specified in the source image. CCITT4 can have non-square pixels (different DPI for X and Y) so IMHO it's a good idea to do something like this:
Bitmap destination = new Bitmap(source.Width, source.Height, PixelFormat.Format1bppIndexed);
destination.SetResolution(source.HorizontalResolution, source.VerticalResolution);
|
|
|
|
 |
|
 |
hi, i'm french and i have download you Source , it's a very good Programs Congratulation...
But i have a little problem when a create a .Tiff (with on or more image) , my image(page) are in color and when i create the .tiff file , i don't have Color....
I would to creat a .tif file in COLOR like Original Image !! How can i do that ??
Thank you very much ,
I appreciate your Job , thank you MISTER
|
|
|
|
 |
|
 |
Hi
Thanks for your appreciation. Well if you see that code then, you will find that there is a function which converts an image into bi-tonal image and bi-tonal images have only two bits(white and black). This is a reason why its color chages to black and white.
Also i am applying CCITT4 compression and the CCITT4 compression is applicable to bi-tonal images only. So if you dont want to loose color remove the function call and apply different compression.
Hope this helps...
|
|
|
|
 |
|
|
 |
|
 |
While Saving Jpeg which contains text, the quality of image is reduced very much. Am doing some OCR Work in the image. So if the image quality reduce, then OCR Process cannot be succeed.
Can any one knows the solution ?
|
|
|
|
 |
|
 |
Hi,
I have an image which is a negative TIFF image. When i am trying to save the image, I want to convert it to a normal TIFF image. Can you please tell me how to differentiate between a normal TIFF and a Negative TIFF. I am using C#. Can you please send me the code for checking this. I think we have to change somehting in convertToBitonal(Bitmap original)???
.. I have been trying to find it for a long time.. but in vain... Please help me ASAP.
|
|
|
|
 |
|
 |
You saved me from these 500KB tif files.... Now they are nice and small, 30KB each.
Thanks!
|
|
|
|
 |
|
 |
First I'd like to say Thanks for the great article/code!
My question is if there is a way to specify the DPI of the resulting tiffs?
I have tiffs with 300 DPI B/W and they are ending up as 96 DPI.
Thanks
|
|
|
|
 |
|
 |
Thanks for your appreciation.
To answer your question,
You are getting resulting image with 96DPI but you want it to be 300DIP.
I am not able to understand why it is reducing DPI 96DIP from 300DPI. Can you please try to print your origional image's DPI value before applying any compression. I have the doubts that your image itself is having 96DPI.
I dont know about a way to set DPI for an image but if i get something, i will surely post it.
Thanks
Bijul Soni
|
|
|
|
 |
|
|
 |
|
 |
I'm having the same issue, the resolution is staying the same but the DPI drops from original 200DPI to 96DPI.
Something weird, is that it appears the first page is what is messed up, and not the second in a multi frame tif.
There isn't any data loss, the viewer just shows the tiff first page, 96 points to an inch verses the 200 points to an inch.
Please let me know if you find anything, I'm still looking myself.
Excellent Artcle-
Thanks,
Jonathan
|
|
|
|
 |
|
 |
In the ConvertToBitonal routine add the line marked below:
// Create destination bitmap
Bitmap destination = new Bitmap(source.Width, source.Height, PixelFormat.Format1bppIndexed);
-----> destination.SetResolution(source.HorizontalResolution, source.VerticalResolution);
|
|
|
|
 |
|
 |
This really helps a lot. Please be aware though that MS fax printer driver seems to have a problem with CCITT4 encoding at 1728x2200, but not with a smaller size (fatal error even though submitted to the fax server successfully). A little bizarre, but the method of solving this is to use no compression.
|
|
|
|
 |
|
 |
Works perfectly for what I was trying to do. I had something similar to this, but not laid out as well and it was incredibly slow. Very efficient.
|
|
|
|
 |