Re: [Gimp-user] Tiff and Ufraw plugin problem

2008-03-14 Thread Stephan Hegel
Hi all,

Thanks for the replies, especially Sven's explanation and the pointer
to pluginrc.

Sven Neumann wrote:
> Certainly nothing with Exif. My guess is that the Ufraw plug-in claims
> responsibility for this file. Most probably the magic header that the
> ufraw loader registers matches for this file. This may be a bug in the
> Ufraw plug-in. You should contact the author.
Well, I'd like to let you know that I've got a dcraw fix (via the hugin
mailing list) which is supposed to solve the problem. I've checked it and
it works for me now. Find the little patch below - in fact it is just one
more check.

However, please note that Ufraw / Ufraw-Gimp come with their own, slightly
modified copy of draw. It is not enough to install a new dcraw, one has to
fix the dcraw copy within the ufraw source package (the section is easy to
find) and rebuild it.

Rgds,
Stephan.


 > This patch fixes the problem.  I ran it against my entire
 > test suite to make sure it doesn't cause any other problems:
 >
 > --- dcraw.c  2008/03/05 01:29:34 1.399
 > +++ dcraw.c  2008/03/13 16:27:43
 > @@ -5358,6 +5358,7 @@
 >is_raw = 0;
 >if (!dng_version && tiff_bps == 8 && tiff_compress == 1 &&
 >  tiff_ifd[raw].phint == 1) is_raw = 0;
 > +  if (tiff_bps == 8 && tiff_samples == 4) is_raw = 0;
 >for (i=0; i < tiff_nifds; i++)
 >  if (i != raw && tiff_ifd[i].samples == max_samp &&
 >  tiff_ifd[i].width * tiff_ifd[i].height / SQR(tiff_ifd[i].bps+1) >
 >
 >  This will be included in dcraw v8.84.
 >
 >  Dave Coffin  3/13/2008
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Tiff and Ufraw plugin problem

2008-03-14 Thread Marco Ciampa
On Fri, Mar 14, 2008 at 08:49:49AM +0100, Sven Neumann wrote:
> Hi,
> 
> On Fri, 2008-03-14 at 08:39 +0100, Marco Ciampa wrote:
> > On Wed, Mar 12, 2008 at 06:29:20PM +0100, Stephan Hegel wrote:
> > > I've a file here which is identified as an tiff image by Imagemagick's
> > > identify, opens perfectly without any warning in xv, gqview and
> > > cinepaint but when I try to open it in Gimp the Ufraw plugin is launched.
> > > 
> > > What could Gimp make thinking that this is a raw image file ... any
> > > idea ? Suspicious exif information ?
> > > 
> > This really seams a file manager problem...contact the package manager of
> > your distro that is responsible for the file extension/mime configuration...
> 
> As far as I understand this, the problem is that GIMP decides to use the
> Ufraw plug-in instead of the TIFF plug-in to open this image. So this is
> definitely not a file manager problem.
You're right, sorry for the misunderstanding... 

-- 

Marco Ciampa

++
| Linux User  #78271 |
| FSFE fellow   #364 |
++
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Tiff and Ufraw plugin problem

2008-03-14 Thread Sven Neumann
Hi,

On Thu, 2008-03-13 at 18:52 +0100, Sven Neumann wrote:

> Certainly nothing with Exif. My guess is that the Ufraw plug-in claims
> responsibility for this file. Most probably the magic header that the
> ufraw loader registers matches for this file. This may be a bug in the
> Ufraw plug-in. You should contact the author.

Perhaps I should add this hint: If you want to check what exactly the
ufraw and tiff plug-ins are telling GIMP about the files that they can
open, you can do this by looking at your pluginrc (in your ~/.gimp-2.4
folder). There should be something like this for the tiff loader:

(load-proc
(extension "tif,tiff")
(magic "0,string,II*\\0,0,string,MM\\0*")
(mime-type "image/tiff"))

So what does this tell GIMP? It says that any file that starts with the
string "II*\\0" or with the string "MM\\0*" is a TIFF file. This
corresponds to the TIFF spec that says:

  A TIFF file begins with an 8-byte image file header, containing the
  following information:

 Bytes 0-1:
   The byte order used within the file. Legal values are:
  “II”(4949.H)
  “MM” (4D4D.H)
   In the “II” format, byte order is always from the least
   significant byte to the most significant byte, for both
   16-bit and 32-bit integers This is called little-endian byte
   order. In the “MM” format, byte order is always from most
   significant to least significant, for both 16-bit and 32-bit
   integers. This is called big-endian byte order.
 Bytes 2-3:
   An arbitrary but carefully chosen number (42) that further
   identifies the file as a TIFF file.
   The byte order depends on the value of Bytes 0-1.


Sven


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Tiff and Ufraw plugin problem

2008-03-14 Thread Sven Neumann
Hi,

On Fri, 2008-03-14 at 08:39 +0100, Marco Ciampa wrote:
> On Wed, Mar 12, 2008 at 06:29:20PM +0100, Stephan Hegel wrote:
> > I've a file here which is identified as an tiff image by Imagemagick's
> > identify, opens perfectly without any warning in xv, gqview and
> > cinepaint but when I try to open it in Gimp the Ufraw plugin is launched.
> > 
> > What could Gimp make thinking that this is a raw image file ... any
> > idea ? Suspicious exif information ?
> > 
> This really seams a file manager problem...contact the package manager of
> your distro that is responsible for the file extension/mime configuration...

As far as I understand this, the problem is that GIMP decides to use the
Ufraw plug-in instead of the TIFF plug-in to open this image. So this is
definitely not a file manager problem.


Sven


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Tiff and Ufraw plugin problem

2008-03-14 Thread Marco Ciampa
On Wed, Mar 12, 2008 at 06:29:20PM +0100, Stephan Hegel wrote:
> Hi all,
> 
> I've a file here which is identified as an tiff image by Imagemagick's
> identify, opens perfectly without any warning in xv, gqview and
> cinepaint but when I try to open it in Gimp the Ufraw plugin is launched.
> 
> What could Gimp make thinking that this is a raw image file ... any
> idea ? Suspicious exif information ?
> 
This really seams a file manager problem...contact the package manager of
your distro that is responsible for the file extension/mime configuration...

and

configure your file manager accordingly (under kde use kcontrol...)

bye

-- 

Marco Ciampa

++
| Linux User  #78271 |
| FSFE fellow   #364 |
++
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Tiff and Ufraw plugin problem

2008-03-13 Thread Sven Neumann
Hi,

On Wed, 2008-03-12 at 18:29 +0100, Stephan Hegel wrote:
> Hi all,
> 
> I've a file here which is identified as an tiff image by Imagemagick's
> identify, opens perfectly without any warning in xv, gqview and
> cinepaint but when I try to open it in Gimp the Ufraw plugin is launched.
> 
> What could Gimp make thinking that this is a raw image file ... any
> idea ? Suspicious exif information ?

Certainly nothing with Exif. My guess is that the Ufraw plug-in claims
responsibility for this file. Most probably the magic header that the
ufraw loader registers matches for this file. This may be a bug in the
Ufraw plug-in. You should contact the author.


Sven


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user