![]() |
|
|
|
|
1
28th April 18:08
External User
Posts: 1
|
There are no 8bpp non-indexed formats that I am aware of.
Is this a mobile format perhaps? I would imagine that encoding such an image wouldn't be difficult unless it used some wierd compression scheme also. You could write a brute-force encoder if you knew the target format. -- Bob Powell [MVP] Visual C#, System.Drawing Ramuseco Limited .NET consulting http://www.ramuseco.com Find great Windows Forms articles in Windows Forms Tips and Tricks http://www.bobpowell.net/tipstricks.htm Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/faqmain.htm All new articles provide code in C# and VB.NET. Subscribe to the RSS feeds provided and never miss a new article. |
|
|
|
|
|
|
7
7th September 12:03
External User
Posts: 1
|
I'm currently having a similar problem to Norbert.
I have an indexed multi page tiff file, and I need to apply a watermark to the second page of the tiff. Unfortunately I can't do Graphics.FromImage(currentFile); because it an indexed image. I need a way to convert it from an indexed image so I can apply a watermark. Unless anyone can suggest how I might add a watermark to an indexed tiff file? Cheers for any help Wes *** Sent via Developersdex http://www.developersdex.com *** |
|
|
8
7th September 12:03
External User
Posts: 1
|
To convert any indexed image, use Lockbits to access the image bits
directly. Create a 24bpp or 32bpp destination bitmap. For each source indexed image scanline, look up each pixel in the palette(i.e., each pixel is an index into a palette of colors) and upack it to your destination 24bpp or 32bpp bitmap. The palette provides you with a distinct red, green and blue color for each index. See Bob Powell's excellent examples for using Lockbits. Find great Windows Forms articles in Windows Forms Tips and Tricks http://www.bobpowell.net/tipstricks.htm Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/faqmain.htm |
|
|
9
7th September 12:03
External User
Posts: 1
|
Cheers for the speedy reply.
I've read through bob powells lockbits page and i feel like an idiot because I don't know where to start implementing it. If anyone can help simplify this that would be great, I'm really struggling to make head nor tail of it. Ideally I'd like an example of a 1bppindexed file being converted to 24 or 32bppnon-indexed file. Once again, any help is appreciated, although I'm beginning to think I'm getting in too deep here. Thanks again. Wes *** Sent via Developersdex http://www.developersdex.com *** |
|