|
|
Comments and Discussions
|
|
 |

|
What can I say other than outstanding?
I only needed the first method to solve my problem as I only need to display images and not truly convert them.
Cheers.
|
|
|
|

|
Hi,
I tried this example for my 200 dpi, Black and White Tiff image, but it throws an Exception on statement
Bitmap original = New Bitmap(strSrcFileName);
an Exception is "Invalid Parameters".
|
|
|
|

|
Hi Micheal
Great Article, well written as well as well coded.
Quick question.
I am currently working on a project which requires TIFF images to be converted into bitonal format before being read into a base64 string.
I have it working using your methodolgy to generate the bitonal file and the MSDN method of reading a file into a byte array and then into a base 64 string.
However this requires writing the file out and back in, what I am trying to achive is combining both functions in memory (byte Arrays, steams) however it seams that the Codec and Compression details are not being corporated correctly.
...and the question - should it be possible to combine the bitonal conversion with the base64 conversion without writing out to file and if so do you know what I am missing.
Dave
|
|
|
|

|
I modified the example code below to read a file into a byte array, convert to base64, then convert back to a byte array, create a memory stream and create a bitmap from the stream. On the output side I show how to save directly to a memory stream and convert the bytes into base 64. I hope this helps.
byte[] bytes = File.ReadAllBytes(@"..\..\Bitonal-In.tif");
string base64 = Convert.ToBase64String(bytes);
bytes = Convert.FromBase64String(base64);
MemoryStream ms = new MemoryStream(bytes);
Bitmap originalBitmap = new Bitmap(ms);
originalImage.Image = originalBitmap;
Bitmap rgbBitmap = Converter.ConvertToRGB(originalBitmap);
using (Graphics g = Graphics.FromImage(rgbBitmap))
{
using (Font f = new Font("Arial", 1.0f, GraphicsUnit.Inch))
{
g.DrawString("Test Imprint", f, Brushes.Black, 500, 1200);
}
}
Bitmap bitonalBitmap = Converter.ConvertToBitonal(rgbBitmap);
convertedImage.Image = bitonalBitmap;
ImageCodecInfo imageCodecInfo = GetEncoderInfo("image/tiff");
System.Drawing.Imaging.Encoder encoder = System.Drawing.Imaging.Encoder.Compression;
EncoderParameters encoderParameters = new EncoderParameters(1);
EncoderParameter encoderParameter = new EncoderParameter(encoder, (long)EncoderValue.CompressionCCITT4);
encoderParameters.Param[0] = encoderParameter;
ms = new MemoryStream();
bitonalBitmap.Save(ms, imageCodecInfo, encoderParameters);
base64 = Convert.ToBase64String(ms.ToArray());
|
|
|
|

|
Micheal,
Thanks a million, code works a treat,
It looks like the "convert to base64, then convert back to a byte array" is the missing link and I know I would never have come up with it if I lived to be 100
Again Thanks
Dave
|
|
|
|

|
Glad to be of service.
|
|
|
|

|
Hi, I just need convert the bitmap image to byte[], because I save it in DB. In Windows XP I got the problem "The parameter is not valid" but now with this code is working fine. I pase my code if someone need it.
private byte[] EncodeImageAlternative(Bitmap image)
{
try
{
// Create bitmap from stream
Bitmap originalBitmap = image;
// Display image
//image.Image = originalBitmap;
// Convert bitmap to RGB format for drawing
Bitmap rgbBitmap = BitonalConverter.Converter.ConvertToRGB(originalBitmap);
// Get a graphics object for drawing on bitmap
using (Graphics g = Graphics.FromImage(rgbBitmap))
{
// Create a font to use for drawing text
using (Font f = new Font("Arial", 1.0f, GraphicsUnit.Inch))
{
// Draw text
g.DrawString("Test Imprint", f, Brushes.Black, 500, 1200);
}
}
// Convert image to bitonal for saving to file
Bitmap bitonalBitmap = BitonalConverter.Converter.ConvertToBitonal(rgbBitmap);
// Display converted image
//convertedImage.Image = bitonalBitmap;
// Get an ImageCodecInfo object that represents the TIFF codec.
ImageCodecInfo imageCodecInfo = GetEncoderInfo("image/tiff");
System.Drawing.Imaging.Encoder encoder = System.Drawing.Imaging.Encoder.Compression;
EncoderParameters encoderParameters = new EncoderParameters(1);
// Save the bitmap as a TIFF file with group IV compression.
EncoderParameter encoderParameter = new EncoderParameter(encoder, (long)EncoderValue.CompressionCCITT4);
encoderParameters.Param[0] = encoderParameter;
// bitonalBitmap.Save(@"..\..\Bitonal-Out.tif", imageCodecInfo, encoderParameters);
// Write to memory stream
using (MemoryStream ms = new MemoryStream())
{
bitonalBitmap.Save(ms, imageCodecInfo, encoderParameters);
// Convert to base64 string
return ms.ToArray();
}
}
catch (Exception ex)
{
string strError = string.Empty; Process.Utility.CustomInsertLoggingAudit(ex, out strError);
MessageBox.Show(LanguageResources.GetStringFromResources("ExceptionHandling_Message") + " (" + strError + ")", LanguageResources.GetStringFromResources("Error"), MessageBoxButtons.OK, MessageBoxIcon.Error);
}
|
|
|
|

|
Before i try your Solution.
Did you ever try using very big Images with 2400 dpi and 27 Inches ?
I am looking for a Solution loading a 1bit tiff lwz, inserting a Text Info and barcode Image, and saving into a 1bit tiff lwz back.
Thanks for your answer.
Best regards.
Bertrand Cadrot
|
|
|
|

|
First thought --- Yikes!
If my math is correct, a 2400dpi 27" square image would require about 524 meg of memory in 1 bit per pixel mode. Converted to an RGB format for drawing using a .NET Graphics object would require on the order of 12 or 16 gigs of memory, well beyond the bounds of something a sane person would attempt, in my opinion.
If I were to be handed this task and wanted to use the general techniques written about here, I would probably do something like the following.
- Determine if .NET can load the bitonal image in the first place. Assuming a square image, this alone will require on the order of 524 meg of memory.
- I would then use the LockBits method to obtain a byte array for the image data.
- Converting the entire source image to RGB for drawing is ill-advised, so I would create an image just large enough to render what I wanted to draw on the main image. Hopefully this is a much smaller area than the main image. I would render what I wanted to overlay on the main image into this image and then convert this sub-image into a bitonal image using the techniques discussed.
- I would then get a byte array for the sub-image using lock bits and start manually compositing the smaller image onto the larger image. This would require computing the offset into the byte arrays of the main image and sub-image, then walking the bytes and merging the bytes from the sub-image into the main image directly rather than trying to use drawing function.
This technique would still allow you to use .NET drawing functions on the smaller image, but you would need to do some direct manipulation of the raw image data to overlay the drawn image onto the original image.
I hope I made sense here and this helps. I also hope your computer has lots and lots of RAM.
|
|
|
|

|
I am using the GDI+ library to draw into a bitmap (width:3492 x height:2481) @ 300 dpi for both horizontle and vertical resolution. makes almost an A4 paper.
The bitmap works fine if i save it as tiff without any encoders.
my task is to save my image as 1 bit tiff.
but for some reason when i convert using your function ConvertToBitonal the output bitmap is all black.
for Info: when i save my bitmap normally as tiff following are the specs
Dimension: 3492x2481
resolution: 300x300
bit depth: 32
compression: LZW
Thank you.
|
|
|
|

|
The code uses a threshold value for the source pixel to determine if the output pixel should be white or black and doesn't do any sort of dithering or color/grayscale to bitonal conversion. If your source image is either a color or grayscale image and all the pixels are below the threshold, then you would get a solid black image. If your image is already black and white and not color or grayscale and the conversion is resulting in a solid black result, then it will be difficult to diagnose without looking at the image data. It's now been quite a while since I've worked with this code or imaging in general, but if you're working with a color/grayscale image, then you'll have to dither it or use some other sort of conversion to get it into just black and white pixels before this method will work to save it was a bitonal (1-bit) TIFF.
|
|
|
|

|
Thank you for a quick reply.
My image is already black and white. its actually text data with lines and grids produced through GDI+.
The point is i am not even writing the image to file. I am passing your function BITMAP object of the System.Drawing.Bitmap class. and since i cant DIRECTLY save it as CCIT4 @ 1bit , I am trying to use your technique.
The total pixel value where you compare the RGB always return as zero.
|
|
|
|

|
I'm happy to try to help figure out what's going on and why it's not working for you as it should. I understand that you're passing in a bitmap object generated in code and that if you save that bitmap to a file directly, it looks right, but if you first convert it with my code, then it comes out all black. If the pixelTotal that results from adding up the RGB values for each pixel is always zero, then it sounds like the buffer doesn't contain your image for some reason or the LockBits function isn't returning good data or something like that. It's hard to debug without being able to step through the code and see what the data looks like. One thing I would try, for debugging purposes, is save the generated bitmap out to a file without encoding and make sure it looks right, then read the file in and send it through the function and see if you get the same result. If you do, then perhaps you could send me the BMP file and I would have something more to go on for debugging.
|
|
|
|

|
I figured that the problem is not with what i am doing to the bitmap but seems inherent with any bitmap. So i created a simple project and write one line to the bitmap using Graphics.
I have two picture boxes PictureBox1 and PictureBox2 just to show the image, you can skip that and check out the result through files.
I am using MS VS 2010 on 64BIT WINDOWS 7.
//#########################################
//USING A STRUCTURE FOR MARGINS
//#########################################
public struct MarginBounds
{
public static int X = 25;
public static int Y = 35;
public static int Top = 35;
public static int Bottom = 2455;
public static int Left = 25;
public static int Right = 3465;
public static int Height = 2455;
public static int Width = 3465;
}
private static ImageCodecInfo getEncoderInfo(string mimeType)
{
int j;
ImageCodecInfo[] encoders;
encoders = ImageCodecInfo.GetImageEncoders();
for (j = 0; j < encoders.Length; ++j)
{
if (encoders[j].MimeType == mimeType)
return encoders[j];
}
return null;
}
private void generateImage()
{
Bitmap b = new Bitmap(3492, 2481);
b.SetResolution(300, 300);
Graphics printer = Graphics.FromImage(b);
StringFormat stringFormat = new StringFormat();
stringFormat.Alignment = StringAlignment.Near;
stringFormat.LineAlignment = StringAlignment.Center;
// Draw Block code
Font font = new Font("Arial", 10);
SizeF pSize = printer.MeasureString("TESTING", font, MarginBounds.Width, stringFormat);
printer.DrawString("TESTING", font, new SolidBrush(System.Drawing.Color.Black), new Rectangle(MarginBounds.Left, Top, MarginBounds.Width, (int)pSize.Height), stringFormat);
b.Save("c:\\test\\testing.tiff", System.Drawing.Imaging.ImageFormat.Tiff);
pictureBox1.Image = b;
Bitmap bitonal = Converter.ConvertToBitonal(b);
pictureBox2.Image = bitonal;
ImageCodecInfo tiffCodec = getEncoderInfo("image/tiff");
System.Drawing.Imaging.Encoder compressionEncoder = System.Drawing.Imaging.Encoder.Compression;
System.Drawing.Imaging.Encoder depthEncoder = System.Drawing.Imaging.Encoder.ColorDepth;
EncoderParameters params1 = new EncoderParameters(2);
EncoderParameter param1 = new EncoderParameter(compressionEncoder, (long)EncoderValue.CompressionCCITT4);
EncoderParameter param2 = new EncoderParameter(depthEncoder, 1L);
params1.Param[0] = param1;
params1.Param[1] = param2;
bitonal.Save("c:\\test\\temp1Bit.tif", tiffCodec , params1);
}
and thank you for all your support.
Regards
|
|
|
|

|
while posting i just had a thought. Can it be because the bitmap has no background? It is transparent instead of white.
|
|
|
|

|
I guess discussion does produce new ideas. It was the transparency of the bitmap. i filled it with white color and then printed on it, solved the problem.
Thank you Micheal for your time and all your help!
Regards
|
|
|
|

|
Excellent! I'm sure I probably experienced something similar with dynamically generating images somewhere along the line, so I feel your pain. I'm very happy to hear you found the solution and bouncing ideas back and forth helped. I can't say I did anything, but you're welcome for my moral support.
|
|
|
|

|
I have a tiff image which I believe is already bitonal. I want to make it lighter or gray(where the black areas have been speckeled so they look gray). This will allow us to see through the data even if the alignment is not correct.
|
|
|
|

|
Thank you for providing a nice article. I was actually searching for one like this.
I have one query... What if the tiff has multipages? I mean how to convert the multipage tiff to bmp? The same compression technique (CCITT-4) needs to be maintained in all the pages of each file. How to achieve that?
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|

|
It has been a while since I have worked with multipage TIFF's, but I found the following old snippet of code I used to split a multipage TIFF into separate files.
public static void Split(string inputFile)
{
// Open TIFF file
Bitmap bitmap = new Bitmap(inputFile);
// Create output filename template
FileInfo finfo = new FileInfo(inputFile);
string directory = finfo.DirectoryName;
string baseFilename = finfo.Name.Substring(0, finfo.Name.Length - finfo.Extension.Length);
// Get framecount (pages)
int pageCount = bitmap.GetFrameCount(FrameDimension.Page);
// Export pages
for(int i = 0; i < pageCount; i++)
{
bitmap.SelectActiveFrame(FrameDimension.Page, i);
bitmap.Save(Path.Combine(directory, string.Format("{0}-{1:0000}.tif", baseFilename, i + 1)),
ImageFormat.Tiff);
}
// Dispose of bitmap
bitmap.Dispose();
}
The GetFrameCount method gives you the number of pages and the SelectActiveFrame sets the page you want to work with. I think you may be able to use these calls to modify a multipage TIFF in place. Hopefully this will help.
|
|
|
|

|
static public class BitonalBitmap
{
static BitonalBitmap() { }
static public Bitmap FromBitmap(Bitmap source)
{
BitmapData data = null;
try
{
data = source.LockBits(new Rectangle(0, 0, source.Width, source.Height), ImageLockMode.ReadOnly, PixelFormat.Format1bppIndexed);
return new Bitmap(data.Width, data.Height, data.Stride, PixelFormat.Format1bppIndexed, data.Scan0);
}
finally
{
if (data != null) { source.UnlockBits(data); }
}
}
}
|
|
|
|

|
Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.Runtime.InteropServices
'****************************
'* http://www.codeproject.com/KB/GDI-plus/BitonalImageConverter.aspx
'* Licensed under The Code Project Open License (copy must be included with code if code is redistributed - CPOL.html)
'****************************
Public Class Converter
Public Shared Function ConvertToRGB(ByRef original As Bitmap) As Bitmap
Dim newImage As Bitmap = New Bitmap(original.Width, original.Height, PixelFormat.Format32bppArgb)
newImage.SetResolution(original.HorizontalResolution, original.VerticalResolution)
Using g As Graphics = Graphics.FromImage(newImage)
g.DrawImageUnscaled(original, 0, 0)
End Using
Return newImage
End Function
Public Shared Function ConvertToBitonal(ByRef original As Bitmap) As Bitmap
Dim source As Bitmap = Nothing
' If original bitmap is not already in 32 BPP, ARGB format, then convert
If original.PixelFormat <> PixelFormat.Format32bppArgb Then
source = New Bitmap(original.Width, original.Height, PixelFormat.Format32bppArgb)
source.SetResolution(original.HorizontalResolution, original.VerticalResolution)
Using g As Graphics = Graphics.FromImage(source)
g.DrawImageUnscaled(original, 0, 0)
End Using
Else
source = original
End If
' Lock source bitmap in memory
Dim sourceData As BitmapData = source.LockBits(New Rectangle(0, 0, source.Width, source.Height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb)
' Copy image data to binary array
Dim imageSize As Integer = sourceData.Stride * sourceData.Height
Dim sourceBuffer(imageSize - 1) As Byte
Marshal.Copy(sourceData.Scan0, sourceBuffer, 0, imageSize)
' Unlock source bitmap
source.UnlockBits(sourceData)
' Create destination bitmap
Dim destination As Bitmap = New Bitmap(source.Width, source.Height, PixelFormat.Format1bppIndexed)
destination.SetResolution(original.HorizontalResolution, original.VerticalResolution)
' Lock destination bitmap in memory
Dim destinationData As BitmapData = destination.LockBits(New Rectangle(0, 0, destination.Width, destination.Height), ImageLockMode.WriteOnly, PixelFormat.Format1bppIndexed)
' Create destination buffer
imageSize = destinationData.Stride * destinationData.Height
Dim destinationBuffer(imageSize - 1) As Byte
Dim sourceIndex As Integer = 0
Dim destinationIndex As Integer = 0
Dim pixelTotal As Integer = 0
Dim destinationValue As Byte = 0
Dim pixelValue As Integer = 128
Dim height As Integer = source.Height
Dim width As Integer = source.Width
Dim threshold As Integer = 500
' Iterate lines
For y As Integer = 0 To height - 1
sourceIndex = y * sourceData.Stride
destinationIndex = y * destinationData.Stride
destinationValue = 0
pixelValue = 128
' Iterate pixels
For x As Integer = 0 To width - 1
' Compute pixel brightness (i.e. total of Red, Green, and Blue values) - Thanks murx
' B G R
pixelTotal = CInt(sourceBuffer(sourceIndex)) + CInt(sourceBuffer(sourceIndex + 1)) + CInt(sourceBuffer(sourceIndex + 2))
If (pixelTotal > threshold) Then
destinationValue += CType(pixelValue, Byte)
End If
If pixelValue = 1 Then
destinationBuffer(destinationIndex) = destinationValue
destinationIndex += 1
destinationValue = 0
pixelValue = 128
Else
pixelValue >>= 1
End If
sourceIndex += 4
Next
If pixelValue <> 128 Then
destinationBuffer(destinationIndex) = destinationValue
End If
Next
' Copy binary image data to destination bitmap
Marshal.Copy(destinationBuffer, 0, destinationData.Scan0, imageSize)
' Unlock destination bitmap
destination.UnlockBits(destinationData)
' Dispose of source if not originally supplied bitmap
If Not Object.ReferenceEquals(source, original) Then
source.Dispose()
End If
Return destination
End Function
End Class
|
|
|
|

|
Good work michael.
Keep it UP!!!
|
|
|
|

|
Hi,
First of all, this is a great tool and I appreciate the effort you have put in.
I tried converting a grayscale tiff image (in the CCITT Group IV compression format) to a bitonal image and was able to save it too, it works great but when I check the image compression format it is using the LZW compression and not the original CCITT Group IV format.
Can you please confirm and provide any suggestions for saving it with the CCITT Group IV format?
Regards,
Saransh.
|
|
|
|

|
I'm afraid I don't understand. The example code that comes with the project saves the result out to a CCITT Group IV Format. It's important to use the encoder parameters to trigger the codec to use the CCITT4 format.
The code is shown below:
// Convert image to bitonal for saving to file
Bitmap bitonalBitmap = Converter.ConvertToBitonal(rgbBitmap);
// Display converted image
convertedImage.Image = bitonalBitmap;
// Get an ImageCodecInfo object that represents the TIFF codec.
ImageCodecInfo imageCodecInfo = GetEncoderInfo("image/tiff");
System.Drawing.Imaging.Encoder encoder = System.Drawing.Imaging.Encoder.Compression;
EncoderParameters encoderParameters = new EncoderParameters(1);
// Save the bitmap as a TIFF file with group IV compression.
EncoderParameter encoderParameter = new EncoderParameter(encoder, (long)EncoderValue.CompressionCCITT4);
encoderParameters.Param[0] = encoderParameter;
bitonalBitmap.Save(@"..\..\Bitonal-Out.tif", imageCodecInfo, encoderParameters);
|
|
|
|

|
Great job! Very well written and organized code. I was able to plug it right into my app without any problems at all.
-Tom
|
|
|
|

|
Thanks for the kind words. I'm glad it helped you out.
|
|
|
|

|
ConvertToBitonal() is solution to my problem, thanks msp.netdev
|
|
|
|

|
Hey Michael, that brings back memories. I used to also use Turbo-C on a Toshiba laptop which had to stiffy drives, one with the program disk and the other had your source code on it. Thanks for the article, very interesting.
Steve
|
|
|
|

|
You might have wondered why your images come out so pale. You add up GRA instead of RGB and A is most likely 255. Replace your code:-
pixelTotal = sourceBuffer[sourceIndex + 1] + sourceBuffer[sourceIndex + 2] + sourceBuffer[sourceIndex + 3];
with:-
pixelTotal = sourceBuffer[sourceIndex] + sourceBuffer[sourceIndex + 1] + sourceBuffer[sourceIndex + 2];
Though we are used to read and write our numbers with the hi-order digits to the left, at least in windows world it's mostly the other way round.
|
|
|
|

|
Thanks for the catch. I'm working on a patch now.
|
|
|
|

|
The article code has been updated accordingly. Thank you.
|
|
|
|

|
Getting the data from the tags of a TIFF image
I'm trying to make a program in C# that opens a TIFF image and puts the data from the tags in texboxs but I do not know how to extract the data. If anyone knows how can help me.
thanks
modified on Tuesday, August 11, 2009 9:06 AM
|
|
|
|

|
here is a routine that I use to copy tags from one tif to another:
private static void CopyTags(Bitmap source, Bitmap destination)
{
destination.SetResolution(source.HorizontalResolution, source.VerticalResolution);
foreach (System.Drawing.Imaging.PropertyItem pi in source.PropertyItems)
{
destination.SetPropertyItem(pi);
}
}
|
|
|
|

|
I needed something to insert a line of text (electronic audit trail) on images that come through. The documents are bi-tonal TIFFs coming in, but I was having a difficult time trying to write onto the image and then save the bi-tonal TIFF out.
Thanks!
Lauren
|
|
|
|

|
You are quite welcome. I'm glad it helped you out.
|
|
|
|

|
thanks for sharing this. really helped me out!
Brendan
|
|
|
|

|
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.
|
|
|
|

|
... and of course we need to apply the same to the destination bitmap:
Bitmap destination = new Bitmap(source.Width, source.Height, PixelFormat.Format1bppIndexed);
destination.SetResolution( original.HorizontalResolution, original.VerticalResolution );
|
|
|
|

|
Thank you. I'm putting in a fix for this.
|
|
|
|

|
The code has been updated with this change. Thank you.
|
|
|
|

|
How can I contol a tiff image like edit,create delete it using
|
|
|
|

|
1. Code below draws any bitmap correctly, including 1bpp bitmap:
Graphics g = pictBox.CreateGraphics();
Bitmap bitmap = new Bitmap("...");
e.Graphics.DrawImage(bitmap);
2. To edit 1bpp bitmap, create new 1bpp Bitmap with the same size, select black pixels by using BitmapData.Scan0 and pointers, and apply new bitmap by using AND operator to the first bitmap. Then, Bitmap.Save() works fine.
|
|
|
|

|
Dear sir,
thanks for the great code!
I have been merging multiple tiff images in to one with this code.
But when I try to print the result document of say 5 mb, it takes 150mb in the spooler.
what to do?
|
|
|
|

|
I'm glad you are finding the code useful. I'm afraid I can't be of much help with the printing. I suspect that when the image is sent to the print spooler, it is getting uncompressed to the full resolution of the printer, perhaps as an RGB image. A 600 dpi RGB image, at an 8.5" x 11" size will take up a lot of memory.
For example:
((8.5" x 600dpi) x (11" x 600dpi)) * 3 bytes per pixel = 100,980,000 bytes (or about 100 meg)
One possible solution that comes to mind is seeing if you can drop down the printer resolution to 300 dpi if you don't need to print at a high resolution.
Another solution might be to reduce the size of the bitmap itself if you don't need a high resolution.
I'm not sure which problem is affecting you, these are just my thoughts and hopefully useful advice.
Best Regards,
Michael McCLoskey
|
|
|
|

|
Dear Michael McCLoskey Sir,
Thanks for the information.
The origional files are with 200dpi and the new file comes with 96dpi, but the size is almost 12 times the original files total size.
And still facing the same problem with printing.
The print spool size goies to 152mb.
Thanks,
|
|
|
|

|
I have placed simple a C# 2005 command-line project on my website. It's an easy way to fax dynamic reports.
Link to the blog page.
If you have FaxComEx.dll, you can simply provide the URL, FAX number and FAX Server name.
If you don't, you can provide a URL, and stdout will provide the generated TIFF name.
I do some basic random dithering that doesn't eat up too many cycles - good enough for my project!
|
|
|
|

|
Very cool stuff! I'm very happy to see my code put to good use. Thanks for the credit. I might have call to use that dithering code you added at some point. I hope you don't mind.
|
|
|
|
|

|
When I use Bitonal code output image resolution is 120 X 120 dpi instead of 300 x 300 dpi and also size of image is 27.50" and 21.33" instead of 11.00" x 8.5". Please advice me what change I need in code to get mention result. Thanks for nice code.
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
How to add bitonal image editing support to your applications
| Type | Article |
| Licence | CPOL |
| First Posted | 15 Aug 2006 |
| Views | 196,370 |
| Downloads | 3,238 |
| Bookmarked | 102 times |
|
|