After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 138178 - inability to read Sun Raster format image files on Windows
inability to read Sun Raster format image files on Windows
Status: RESOLVED NOTGNOME
Product: GIMP
Classification: Other
Component: Plugins
2.0.x
Other Windows
: Normal normal
: ---
Assigned To: GIMP Bugs
GIMP Bugs
: 141807 142174 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-03-26 07:56 UTC by Charles Werner
Modified: 2004-05-13 16:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sample Sun raster image (127.18 KB, application/octet-stream)
2004-04-05 07:09 UTC, Charles Werner
Details

Description Charles Werner 2004-03-26 07:56: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
Comment 1 Charles Werner 2004-03-26 08:01:53 UTC
Creating a Sun Raster image works correctly, but Gimp cannot open the newly
created Sun Raster file either. 
Comment 2 Sven Neumann 2004-03-26 09:47:10 UTC
Seems to work just fine here on Linux. What type and size is the image you tried?
Comment 3 Charles Werner 2004-03-26 10:03:44 UTC
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
Comment 4 Henrik Brix Andersen 2004-03-26 10:17:32 UTC
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.
Comment 5 Henrik Brix Andersen 2004-03-26 10:23:28 UTC
Note: Attempt to force a refresh of the thumbnail fails.
Comment 6 Henrik Brix Andersen 2004-03-26 10:36:52 UTC
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?
Comment 7 Charles Werner 2004-03-29 07:54:42 UTC
Reading Sun Raster files actually fails for Gimp-2.0 pre-4 
Comment 8 Charles Werner 2004-04-03 11:56:44 UTC
Gimp-2.0 pre-2 does however read Sun Raster files correctly
Comment 9 Sven Neumann 2004-04-03 12:36:59 UTC
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.
Comment 10 Charles Werner 2004-04-05 07:09:32 UTC
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
Comment 11 Sven Neumann 2004-04-05 09:49:50 UTC
And of course GIMP-2.0.0 on Linux reads the file w/o a problem and valgrind
doesn't report anything suspicious.
Comment 12 Michael Schumacher 2004-04-19 14:40:24 UTC
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?
Comment 13 weskaggs 2004-04-21 01:07:32 UTC
Could somebody please give *exactly* the error message that appears when it fails.
Comment 14 Charles Werner 2004-04-21 07:11:14 UTC
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
Comment 15 weskaggs 2004-04-21 15:58:09 UTC
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.
Comment 16 Charles Werner 2004-04-22 06:35:27 UTC
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?
Comment 17 Ignas Mikalajunas 2004-04-22 09:42:55 UTC
You can download a working version of the plugin (it worked for me at least).

http://www.mif.vu.lt/~igmi1451/sunras.exe
Comment 18 Charles Werner 2004-04-22 10:00:41 UTC
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? 
Comment 19 Ignas Mikalajunas 2004-04-22 11:05:29 UTC
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 ?
Comment 20 Ignas Mikalajunas 2004-04-22 11:07:43 UTC
Oh btw i am using Mingw + msys
Comment 21 Sven Neumann 2004-04-22 11:49:13 UTC
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
Comment 22 weskaggs 2004-04-22 17:11:10 UTC
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.

Comment 23 Sven Neumann 2004-05-11 14:30:14 UTC
*** Bug 142174 has been marked as a duplicate of this bug. ***
Comment 24 Charles Werner 2004-05-12 06:57:18 UTC
This bug is fixed in the Gimp for Windows 2.0.1 version
installer provided by Jernej Simoncic. Thanks!
Comment 25 Sven Neumann 2004-05-13 16:00:24 UTC
*** Bug 141807 has been marked as a duplicate of this bug. ***