GNOME Bugzilla – Bug 138178
inability to read Sun Raster format image files on Windows
Last modified: 2004-05-13 16:00:24 UTC
Attempts to open any existing Sun Raster format image fails for the Windows version. Error popup states that plugin could not open image. Gimp-2.0 pre 4 functioned correctly. The windows installer was used to install GIMP on a Windows XP machine
Creating a Sun Raster image works correctly, but Gimp cannot open the newly created Sun Raster file either.
Seems to work just fine here on Linux. What type and size is the image you tried?
Reading the Sun raster files failed in the version that runs under Windows I installed both the latest Gimp the GTK tookit from http://www2.arnes.si/~sopjsimo/gimp/stable.html
Odd. I can reproduce the error on MS WinXP using Jernejs installer here. I can save as .ras - but when I try to open the image I get a message stating that the sunras plug-in can not load the image. The thumbnail in the file open dialog is shown correctly, though.
Note: Attempt to force a refresh of the thumbnail fails.
The SUNRAS files saved by the win32 version can be loaded using GIMP on Linux, but the image data looks nothing like what it did at save time. Perhaps the save routine in the sunras plug-in is to blame?
Reading Sun Raster files actually fails for Gimp-2.0 pre-4
Gimp-2.0 pre-2 does however read Sun Raster files correctly
Are you sure that you are tyring to read the very same file? There haven't been any changes to the plug-in since 2.0pre-2. Please attach an example file that you cannot read to this bug-report.
Created attachment 26342 [details] sample Sun raster image This is a Sun raster file (generated by xv) that cannot be read in the Windows version of Gimp-2.0 or Gimp-2.0 pre4 but can be read in Gimp_2.0 pre-2
And of course GIMP-2.0.0 on Linux reads the file w/o a problem and valgrind doesn't report anything suspicious.
I have no problems reading the attached file with my locally built GIMP (gimp-2-0 branch) on WinXP Home. Could this be related to bug 139343?
Could somebody please give *exactly* the error message that appears when it fails.
The Error messages appear as two popup windows: SUNRAS Message Cound not open file.ras as SUN-raster-file GIMP Message Opening file.ras faild: Plug-In could not open image
This error message means that the sunras plug-in is failing to read the header. I note that it uses getc() to read the bytes of the header, and there were strong indications that bug #139343 was caused by getc() misbehaving for binary files. If this is correct, then people who have this problem should also suffer from bug 139343: could you verify that saving a file in Targa format (RLE encoded, which is the default) and then reopening it gives junk? If so, then attention should be focused on a buggy msvcrt.dll as the likely source of the problem.
I saved an image in TGA format (RLE), and then opened it. Gimp could open the file but the image is totally corrupted. I tried an experiment, putting the working sunras.exe pluging from the pre-2 version into the current 2.0 gimp plugins directory. When opening the sun raster file, I received a popup message that this failed because the there has been a change in the plug-in protocol. Why would the pre-2 windows version work, and the current version not? What changed in the the code or build method?
You can download a working version of the plugin (it worked for me at least). http://www.mif.vu.lt/~igmi1451/sunras.exe
Thanks for the newly compiled sunras plugin. It works fine here too. Does this confirm that it is not the plugin, but the compilation process that is the source of difficulties? How did you build this exactly? What package did you download and what was the compilation method? Where is there documentation on how to use gimptool?
1st question - IMHO yes. 2nd question - Built pretty much manualy. Package: Gimp from CVS. Gimptool: Difficult question indeed. I have tried using gimptool yet was unable to configure it properly so i just grabbed the command line it was spitting at me and modified it to fit my needs. Like this: gcc -march=i586 -mmmx -mcpu=i686 -fomit-frame-pointer -O2 -Wall -mms-bitfield s -I/include/gimp-2.0 -I/include/gtk-2.0 -I/lib/gtk-2.0/include -I/include/atk- 1.0 -I/include/pango-1.0 -I/include/glib-2.0 -I/lib/glib-2.0/include -o ./sunra s ./plug-ins/common/sunras.c -L/lib -L/lib -lgimpui-2.0 -lgimpwidgets-2.0 -lgi mp-2.0 -lgimpcolor-2.0 -lgimpmath-2.0 -lgimpbase-2.0 -L/lib -lgtk-win32-2.0 -lg dk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -l gobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv -mwindows Also i have used the deprecated, full of warnings premade config.h for windows (it is in cvs) so any questions ?
Oh btw i am using Mingw + msys
As I already said, the code didn't change, so the problem is in the build process. gimptool is documentated in the gimptool manpage. I am however not sure if the win32 version works as described there: http://www.gimp.org/unix/man-gimptool-2.0.html
This seems to be a bug in mingw; see the following bug report (mingw bug 863667): https://sourceforge.net/tracker/index.php?func=detail&aid=863667&group_id=2435&atid=102435 In short, the bug appears in version 3.2 of Mingw-runtime, and has been fixed in CVS but apparently not in the most recent release.
*** Bug 142174 has been marked as a duplicate of this bug. ***
This bug is fixed in the Gimp for Windows 2.0.1 version installer provided by Jernej Simoncic. Thanks!
*** Bug 141807 has been marked as a duplicate of this bug. ***