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 144943 - Include the RAW_Load Plugin
Include the RAW_Load Plugin
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.2.x
Other All
: Normal enhancement
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2004-06-24 20:30 UTC by Philipp Gühring
Modified: 2008-01-15 12:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
RAW_Load 3.1 (Gimp2 version) (35.10 KB, application/x-gtar)
2004-06-24 20:32 UTC, Philipp Gühring
Details
raw.c extracted from the tarball for easier review (31.45 KB, text/plain)
2004-06-28 10:58 UTC, Sven Neumann
Details
Improved version (22.87 KB, application/octet-stream)
2004-08-22 22:11 UTC, Philipp Gühring
Details
raw.c extracted (32.29 KB, text/plain)
2004-08-22 22:12 UTC, Philipp Gühring
Details
raw.c from Version 3.3 (33.76 KB, text/plain)
2004-08-23 14:50 UTC, Philipp Gühring
Details
raw.c V3.4 (35.69 KB, text/plain)
2004-08-27 13:03 UTC, Philipp Gühring
Details
raw.c V3.5 (35.03 KB, text/plain)
2004-08-29 00:36 UTC, Philipp Gühring
Details

Description Philipp Gühring 2004-06-24 20:30:10 UTC
The RAW Loading Plugin is extremly helpful for extracting images from archive 
files, and analysing binary content. 
I ported it to GIMP2 now, since it does not seem to be maintained anymore. 
I would like it to be included in GIMP, since I use it very often, and I think 
that it is useful for others too.
Comment 1 Philipp Gühring 2004-06-24 20:32:17 UTC
Created attachment 28992 [details]
RAW_Load 3.1 (Gimp2 version)
Comment 2 Sven Neumann 2004-06-28 10:58:29 UTC
Created attachment 29066 [details]
raw.c extracted from the tarball for easier review
Comment 3 Sven Neumann 2004-06-28 11:00:17 UTC
I wouldn't object to include this plug-in but the code you attached is far from
being clean enough to be included in the GIMP source tree. The port to GTK+-2.0
and GIMP-2.0 is only halfway done and the GUI as well as the overall coding
style needs a serious cleanup.
Comment 4 Philipp Gühring 2004-08-22 22:11:24 UTC
Created attachment 30842 [details]
Improved version

Ok, I improved it, it compiles and works cleanly now.
If you want any more improvements, cleanups, ... please tell me exactly what
and how, or perhaps do it yourself.
Comment 5 Philipp Gühring 2004-08-22 22:12:46 UTC
Created attachment 30843 [details]
raw.c extracted
Comment 6 Raphaël Quinet 2004-08-23 07:38:10 UTC
I cannot speak for Sven, but there are a few things that you could improve easily
in this code (compare with other GIMP source files if you want a reference):
- Avoid C++ style comments (//) because they cause problems with some C compilers
  so use only C-style comments (/*...*/) only.
- Try to use gimp_frame_new() instead of gtk_frame_new().  You should also check
  the gimp convenience function for tables.
- Try to use the GNU style for indentation (e.g., opening and closing braces on
  their own line, 2 spaces per indentation level, etc.).  This is explained in the
  file HACKING in the GIMP source tree.  See the section "Hackordnung".
- You should probably add your name to the copyright in gimp_install_procedure().
Comment 7 Philipp Gühring 2004-08-23 14:50:01 UTC
Created attachment 30859 [details]
raw.c from Version 3.3

I normally prefer // comments, because they do not have reentrace problems.
gimp_frame_new() is only available in Gimp2.2, and I would suggest to be
Gimp2.0 compatible.
I changed the indentation now, and added my email address.
Anything else?
Comment 8 Sven Neumann 2004-08-24 08:48:21 UTC
This is not about preferences. // comments are not supported by the compilers
that GIMP is supposed to compile on so there is no way we can accept code that
uses these comments.

Also there is no way the raw plug-in can be accepted into the stable branch and
if you want it to be accepted for 2.2 it will have to use the 2.2 API and adhere
to the look and feel of GIMP 2.2 plug-ins.
Comment 9 Raphaël Quinet 2004-08-24 10:56:16 UTC
If you want the raw plug-in to be available for users of GIMP 2.0, then your best
solution is to make your new version available through http://registry.gimp.org/.

If you want it to be included in the GIMP source tree so that it is distributed
together with the next releases, then you have to use the GIMP 2.2 API.  This
means that you have to use gimp_frame_new() and other functions, as I recommended
above.

Minor detail: although you made a few changes to the indentation of your code, it
still doesn't match the style used in all other GIMP source files.  Please read
the HACKING file carefully if you want to fix this (otherwise someone else will
have to do it anyway, so it is better if you do it yourself).
Comment 10 Philipp Gühring 2004-08-27 13:03:32 UTC
Created attachment 31013 [details]
raw.c V3.4

Ok, I applied the Hackordnung, removed the // comments, posted the Gimp2.0
version to the registry, and here is the proposed Gimp2.2 version.
Comment 11 Sven Neumann 2004-08-27 20:01:36 UTC
I guess we should at least consider it for inclusion then. Thanks for your efforts.
Comment 12 Sven Neumann 2004-08-28 15:55:50 UTC
I had a look at it and this code will need quite some changes before it can be
accepted for inclusion. It is still pretty much a GIMP 1.2 plug-in, using
deprecated GTK+ 1.2 and GIMP 1.2 APIs (like for example gimp_radio_group_new2()
and GtkPreview). It doesn't follow the GIMP coding style and I will also not
accept stupid rants from timecop in our source tree.
Comment 13 Philipp Gühring 2004-08-29 00:36:56 UTC
Created attachment 31055 [details]
raw.c V3.5

Ok, I removed the rant. Do you have a
HOWTO-Convert-GTK1.2-and-Gimp1.2-to-GTK2-and-Gimp2 ?
Otherwise I am at the end of my knowledge. 
Perhaps someone else can do the rest of the necessary improvements.
Comment 14 Sven Neumann 2004-08-29 08:36:44 UTC
Here are some TODOs for the plug-in:

- Replace gimp_radio_group_new2() with gimp_int_radio_group_new(). Integers are
  being used here and the current code won't work on 64bit platforms.
- Replace GtkPreview with GimpPreview.
- Replace GtkFileSelection with GtkFileChooser.
- Port the signal code to GObject.
- Remove all warnings that show up when GLIB_DISABLE_DEPRECATED,
  GDK_DISABLE_DEPRECATED GTK_DISABLE_DEPRECATED and GIMP_DISABLE_DEPRECATED
  are being defined.
Comment 15 Michael Natterer 2004-10-20 14:37:49 UTC
Since i missed this plug-in several times and want it to be included,
I'll do the porting.
Comment 16 Michael Natterer 2004-10-20 18:24:52 UTC
Fixed in CVS:

2004-10-20  Michael Natterer  <mitch@gimp.org>

        * plug-ins/common/raw.c: new plug-in from Tim Copperfield, made
        work with the GIMP 2.1 API by Philipp Gühring, then heavily
        cleaned up and undeprecated by myself. Fixes bug #144943.

        (still uses GtkPreview, but i wanted a sane state in cvs to diff
         against before replacing it)

        * plug-ins/common/plugin-defs.pl: changed accordingly.

        * plug-ins/common/Makefile.am: regenerated.
Comment 17 Philipp Gühring 2005-08-04 07:58:47 UTC
Wasn´t it included in Gimp 2.1 ? I can´t find it anymore in 2.2.4. I can´t even  
find it in the dead files in CVS. Did it break between 2.1 and 2.2, and was 
removed then? 
Comment 18 Philipp Gühring 2005-08-04 08:12:56 UTC
Sorry, I didn´t saw it, because the file-formats are seperated from the 
file-extensions now. 
Comment 19 Sven Neumann 2005-08-04 18:17:16 UTC
Well, it isn't really available in GIMP 2.2 due to a bug in the plug-in
procedure registry (see bug #309361).