Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Device-independent ImageData
Device-independent ImageData [message #442074] Fri, 27 August 2004 15:40 Go to next message
Knut Radloff is currently offline Knut RadloffFriend
Messages: 7
Registered: July 2009
Junior Member
What is the definition of device-independence in the ImageData context? Is it just that the data storage is always guaranteed to be
the same regardless of the platform (as described in the doc/SWT book)? Or does it go as far as requiring that an image loaded on
different platforms results in exactly the same ImageData, including depth. I know this is true with the SWT Java image decoders
because they work the same on all platforms. I'm wondering if it would be valid for a native image decoder to read an image using a
different (larger) depth than the image is actually in or that differs from what the Java decoders read.

The SWT Java image decoders don't always seem to get the color depth right anyway but I'm wondering if that is acceptable or if it
is a bug. Some of the images in the PngSuite result in ImageData with a depth that doesn't match what the image says.

Knut
Re: Device-independent ImageData [message #442151 is a reply to message #442074] Fri, 27 August 2004 20:25 Go to previous message
Christophe Cornu is currently offline Christophe CornuFriend
Messages: 304
Registered: July 2009
Senior Member
Hi Knuth,

> Or does it go as far as requiring that an image loaded on...
No. The current javadoc for ImageData simply states it's often used as an
intermediate format between a stream and a device specific Image. The
depth that might be encoded in an image stream does not have to match the
ImageData depth field. The current implementation will match the depth of
the encoded stream in many cases - but not necessarily. e.g. 3x16 bits rgb
color becomes 3x8 rgb color because this information is not used when
constructing an Image.

On the other hand - if you find png test files with a palette of depth 4
or 16 colors to be converted into an ImageData with a depth of 2 - then
this sounds wrong. Feel free to open a PR with your findings and we'll
check them individually.

Chris
Previous Topic:SWT Browser
Next Topic:Help: DialogCellEditor does not work properly
Goto Forum:
  


Current Time: Sat Apr 27 02:15:37 GMT 2024

Powered by FUDForum. Page generated in 0.02152 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top