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

Bug 434850

Summary: Update WinICOFileFormat and FileFormat to latest version
Product: [RT] RAP Reporter: Stefan Milchram <stefan.milchram>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.2   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows XP   
See Also: https://git.eclipse.org/r/#/c/59539/
Whiteboard:

Description Stefan Milchram CLA 2014-05-14 08:22:41 EDT
WinICOFileFormat and FileFormat in RAP are outdated and can't handle 256x256px .ico.
The following exception is thrown:

org.eclipse.swt.SWTException: Invalid image
	at org.eclipse.swt.SWT.error(SWT.java:3639)
	at org.eclipse.swt.SWT.error(SWT.java:3562)
	at org.eclipse.swt.SWT.error(SWT.java:3533)
	at org.eclipse.swt.internal.image.WinICOFileFormat.loadInfoHeader(WinICOFileFormat.java:203)
	at org.eclipse.swt.internal.image.WinICOFileFormat.loadIcon(WinICOFileFormat.java:130)
	at org.eclipse.swt.internal.image.WinICOFileFormat.loadFromByteStream(WinICOFileFormat.java:122)
	at org.eclipse.swt.internal.image.FileFormat.loadFromStream(FileFormat.java:52)
	at org.eclipse.swt.internal.image.FileFormat.load(FileFormat.java:88)
	at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:133)

I tried the latest version of the files from SWT and it works.
Comment 1 Ivan Furnadjiev CLA 2014-05-19 06:58:11 EDT
Maybe it's better to update the complete package "org.eclipse.swt.internal.image" including the ImageLoader class (has new compression field).
Comment 2 Ivan Furnadjiev CLA 2015-11-05 07:26:35 EST
Fixed with change https://git.eclipse.org/r/#/c/59539/