By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,640 Members | 2,095 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,640 IT Pros & Developers. It's quick & easy.

Determining if an Image is indexed or not

P: n/a
Is there a procedure for determining whether or not an Image uses any of the
indexed pixel formats, short of checking against each one?

--
Jeff S.
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Jeff Stewart" <ob******@gmail.com> schrieb:
Is there a procedure for determining whether or not an Image uses any of
the indexed pixel formats, short of checking against each one?


I am missing 'Image.IsIndexedPixelFormat'... A heuristic way would be
checking the number of items in the image's palette:

\\\
Dim img As Image = Image.FromFile(...)
MsgBox("Indexed format: " & CStr(img.Palette.Entries.Length > 0))
img.Dispose()
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.