Bug 242426

Summary: ImageLoader returning image data with incorrect byte order
Product: [Eclipse Project] Platform Reporter: Kevin Barnes <cocoakevin>
Component: SWTAssignee: Kevin Barnes <cocoakevin>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: Silenio_Quarti, steve_northover
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
bitmap none

Description Kevin Barnes CLA 2008-07-29 13:12:16 EDT
When loading the attached (32 bit bmp) image, we're expecting it to have most significant byte first MSB_FIRST, but getting LSB_FIRST. Eventually when the image gets created it's yellow.


    public static void main(String[] args) {
        final Display display = new Display();
        final Shell shell = new Shell(display);
        shell.setText("Canvas Example");
        shell.setLayout(new FillLayout());
        Canvas canvas = new Canvas(shell, SWT.NONE);
        canvas.addPaintListener(new PaintListener() {
            public void paintControl(PaintEvent e) {
                try {
                	ImageLoader loader = new ImageLoader();
                	ImageData[] loaded = loader.load("close.bmp");
                    Image image = new Image(display, loaded[0]);
                    e.gc.drawImage(image, 10, 10);
                } catch (Exception e1) {
                    e1.printStackTrace();
                }
            }
        });

        shell.open();
        while (!shell.isDisposed()) {
            if (!display.readAndDispatch()) {
                display.sleep();
            }
        }
        display.dispose();
    }
Comment 1 Kevin Barnes CLA 2008-07-29 13:13:15 EDT
Created attachment 108671 [details]
bitmap
Comment 2 Eclipse Webmaster CLA 2019-09-06 16:13:38 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.