Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322799

Summary: Fix GfPackageTests.testGraphitiUiInternal
Product: [Modeling] Graphiti Reporter: Michael Wenz <michael.wenz>
Component: CoreAssignee: Tim Kaiser <tim.kaiser>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tim.kaiser
Version: 0.7.0   
Target Milestone: 0.7.0   
Hardware: All   
OS: Linux-GTK   
Whiteboard:

Description Michael Wenz CLA 2010-08-16 11:04:00 EDT
The test fails when run on the contral Hudson (in line 112). Make it run
Comment 1 Michael Wenz CLA 2010-08-18 05:06:48 EDT
There is a general issue in Linux GTK, that forces SWT to use color depth 24 for creating an Image object from an image descriptor (no matter what is set in the descriptor). See https://bugs.eclipse.org/bugs/show_bug.cgi?id=70949

The test could easily be fixed by using SWT.IMAGE_BMP for the internal representation of the GIF, but the same functionality is also used when saving a diagram as an image. In case of saving as GIF the same issue occurs and setting the format to anything else except GIF will produce a corrupt file.

Two workarounds are provided in the above bug report:
1) use ImageDescriptor instead of Image
2) Re-sample the color depth.

-Michael
Comment 2 Tim Kaiser CLA 2010-08-18 08:09:12 EDT
In case of GIF, we use the image data directly -- without creating an image.
This preserves the correct color depth.
Comment 3 Tim Kaiser CLA 2010-08-18 08:09:22 EDT
fix checked into cvs
Comment 4 Michael Wenz CLA 2010-08-19 10:48:21 EDT
Needs to appear in release review
Comment 5 Michael Wenz CLA 2010-08-19 10:48:40 EDT
Is resolved, will go to verified
Comment 6 Michael Wenz CLA 2010-10-07 03:09:05 EDT
Part of 0.7.0 release