Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > How to get an 8 bit non-indexed image?
User Name
Password
REGISTER NOW! Mark Forums Read




Reply Bookmark and Share
1 28th April 18:08
bob powell [mvp]
External User
 
Posts: 1
Default How to get an 8 bit non-indexed image?



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.
  Reply With Quote


 


2 28th April 18:09
js
External User
 
Posts: 1
Default How to get an 8 bit non-indexed image?



Is this a grayscale image? If so, just use the indexed format and use
a 1-to-1 palette (i.e. where the palette index equals the palette
value). If it's color, then I don't believe the framework supports 8-
bit color bitmaps except with indexes.
  Reply With Quote
3 7th September 12:03
External User
 
Posts: 1
Default How to get an 8 bit non-indexed image?


The indexed image already is limited to 256 colors, an 8-bit non-indexed
image isn't supported by .NET to my knowledge... why do you need an 8-bit
non-indexed bitmap?
  Reply With Quote


 


4 7th September 12:03
michael c
External User
 
Posts: 1
Default How to get an 8 bit non-indexed image?


I don't.

Michael
  Reply With Quote
5 7th September 12:03
External User
 
Posts: 1
Default How to get an 8 bit non-indexed image?


Sorry... I wasn't asking you, I should have replied to Norbert directly... I
was asking them why they needed a non-indexed 8 bit image...
  Reply With Quote
6 7th September 12:03
michael c
External User
 
Posts: 1
Default How to get an 8 bit non-indexed image?


It appears that Norbert has lost interest. :-)

Michael
  Reply With Quote
7 7th September 12:03
wes lowe
External User
 
Posts: 1
Default How to get an 8 bit non-indexed image?


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 ***
  Reply With Quote
8 7th September 12:03
michael phillips, jr.
External User
 
Posts: 1
Default How to get an 8 bit non-indexed image?


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
  Reply With Quote
9 7th September 12:03
wes lowe
External User
 
Posts: 1
Default How to get an 8 bit non-indexed image?


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 ***
  Reply With Quote
Reply


Thread Tools
Display Modes


Some other forums that might be of your interest : Development, Ada, Apple script, Assembler, Awk, Beos, Basic, C, C++, C#, C# .net, .net, .net frameworks, Asp .net, Clarion, Clipper, Clos, Clu, Cobol, Coldfusion, Delphi, Dylan, Eiffel, Forth, Fortran, Haskell, Hermes, Icon, Idl, Java, Java script, Jscript .net, Jcl, Linoleum, Lisp, Lotus, Limbo, Logo, Ml, Mumps, Oberon, Postscript, Pop, Pl1, Prolog, Python, Ruby, Pascal, Perl, Php, Rebol, Rexx, Sed, Sather, Scheme, Smalltalk, Tcl, Vhdl, Vrml, Visual basic, Visual basic .net, Yorick, Mysql, Omnis, Postgresql, Xbase, Access, Oracle, Adabas, Berkeley, Btrieve, Filemaker, Gupta, Db2, Informix, Ingres, Mssql server, Object, Olap, Paradox, Rdb, Revelation, Sybase, Theory, Dbase, Html, Java script, Css, Flash, Photoshop, Corel script, Xml, Tech, Beos, Gem, Hp48, Hpux, Linux, Mac, Ms-dos, Os2, Palm, Solaris, Ti99, Windows, Xenix, Aos, Chorus, Geos, Inferno, Lantastic, Lynx, Mach, Minix, Netware, Os9, Parix, Plan9, Psos, Qnx, Xinu, Sco, Unix, Aix, Aux, 386bsd, Bsdi, Freebsd, Netbsd, Openbsd, Ultrix, Amd, Intel, Aptiva, Buz, Deals, Homebuilt, Overclocking, Programming, Extra forums


Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666