Bug 601130

Summary: Ufraw is crazy with Pentax k-x PEF files
Product: [Fedora] Fedora Reporter: antonio montagnani <antonio.montagnani>
Component: ufrawAssignee: Nils Philippsen <nphilipp>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: nphilipp
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ufraw-0.17-1.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-15 05:30:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Photo out of Pentax 1stDS raw
none
raw file out of a Pentax kx none

Description antonio montagnani 2010-06-07 09:58:26 UTC
Description of problem:
UFraw doesn't decode colours if files are raw with PEF extension from a Pentax k-x

Version-Release number of selected component (if applicable):
ufraw-0.16-2.fc13.i686

How reproducible:
always

Steps to Reproduce:
1.open a PEF file from a Pentax k-x
2.
3.
  
Actual results:
Colours are mismatched, red is missing, therefore all colurs are not correct

Expected results:
Colours should be o.k, as with PEF files coming from a Pentax 1stDS

Additional info:
Pentax k-x seems supported in UFraw, not clear if only raw files with DGN extension (that are o.k.) are supported and not PEF extension
Fspot opens file with correct colours
I cannot upload a PEF file as it is more than 10Mb

Comment 1 antonio montagnani 2010-06-07 11:17:33 UTC
Basically red becomes green.

I understand from Ubuntu forums that upgrading to Ufraw 0.17 should do the trick!!!

Comment 2 antonio montagnani 2010-06-07 20:47:38 UTC
Another problem ..

When I open a DGN file with UFraw a black band is inserted to the far right of the picture.

Dimension of picture coming from proprietary Pentax program is 4288x2848 pixels, but in Ufraw I get 4352x2868 pixel!!!

So at the moment I have to cut the black band with the Gimp!!!

Comment 3 antonio montagnani 2010-06-07 20:50:33 UTC
forgot to say that starting file (DGN) doesn't show any band in Fspot.

Comment 4 antonio montagnani 2010-06-09 04:58:55 UTC
I confirm that Ufraw 0.17 seems o.k. (I installed on a Windows machine, and everything works)

Comment 5 antonio montagnani 2010-06-14 21:25:39 UTC
when 0.17 will be available for Fedora 13??

Comment 6 Nils Philippsen 2010-06-15 13:27:52 UTC
I've planned to make a 0.17 update, but will have to wait for the current lensfun version to be populated to the build machines first.

It is to be expected (usually) that a raw image file developed with ufraw (or any other app using dcraw code) is greater than a JPEG file developed in-camera or by software using the same interpolation algorithms for edge and in-picture pixels. See http://www.cybercom.net/~dcoffin/dcraw/ -- "Why are dcraw output images larger than camera JPEGs?".

Comment 7 Fedora Update System 2010-06-16 09:03:24 UTC
ufraw-0.17-1.fc13,lensfun-0.2.5-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/ufraw-0.17-1.fc13,lensfun-0.2.5-1.fc13

Comment 8 antonio montagnani 2010-06-16 10:50:28 UTC
I installed from koij all upgrades, everything works with an exception:

when I select manually a lens in ufraw I get:

Apertura di "/home/antonio/fotografie/Pentax/raw/100_0606/IMGP0002.PEF" fallita:

La procedura "file-ufraw-load" non ha restituito valori di ritorno

I hope that my translation is good enough to be understood:

Opening of "/home/antonio/fotografie/Pentax/raw/100_0606/IMGP0002.PEF" failed

Procedure "file-ufraw-load didn't answered with return values.

Shall I file a separate bug (I suppose against lensfun)???

Comment 9 Fedora Update System 2010-06-16 17:51:07 UTC
ufraw-0.17-1.fc13, lensfun-0.2.5-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ufraw lensfun'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/ufraw-0.17-1.fc13,lensfun-0.2.5-1.fc13

Comment 10 antonio montagnani 2010-06-22 17:21:31 UTC
Installed suggested updates

Funny(?!!), but now I cannot open PEF files coming from my old Pentax 1stDS!!!

I get

 Opening of "/home/antonio/fotografie/Pentax/raw/100_0606/IMGP0002.PEF" failed

Procedure "file-ufraw-load didn't answered with return values.


I confirm that files coming from my new Pentax k-x are opened.

What is wrong???

Comment 11 antonio montagnani 2010-06-22 20:52:27 UTC
Ufraw 0.17 in Windows works fine...something is connected to Linux release

Comment 12 Nils Philippsen 2010-06-25 13:20:19 UTC
(In reply to comment #10)
> Installed suggested updates
> 
> Funny(?!!), but now I cannot open PEF files coming from my old Pentax 1stDS!!!
> 
> I get
> 
>  Opening of "/home/antonio/fotografie/Pentax/raw/100_0606/IMGP0002.PEF" failed
> 
> Procedure "file-ufraw-load didn't answered with return values.
> 
> 
> I confirm that files coming from my new Pentax k-x are opened.
> 
> What is wrong???    

Please can you attach some raw images from both your cameras (k-x and 1stDS) so I can try it out. If they're too large to attach directly, try if compressing them first (using bzip2 or xz) helps.

Comment 13 antonio montagnani 2010-06-25 14:11:07 UTC
Created attachment 426890 [details]
Photo out of Pentax 1stDS raw

I can't decode it with latest ufraw

Comment 14 antonio montagnani 2010-06-25 14:15:58 UTC
Created attachment 426892 [details]
raw file out of a Pentax kx

Latest Ufraw can decode it...

Comment 15 antonio montagnani 2010-07-04 15:36:48 UTC
any news about my attachments??

Comment 16 Nils Philippsen 2010-07-07 08:29:19 UTC
(In reply to comment #15)
> any news about my attachments??    

Well, they work for me here. I guess that the problem you had was with GIMP, not ufraw. I updated GIMP in the meantime (to 2.6.9-4), that might explain why I didn't have any issues with any of your pictures (regardless of whether I used ufraw as a plugin from GIMP or standalone). Can you check that with the new GIMP version (which is a stable update now)?

Comment 17 antonio montagnani 2010-07-07 08:39:42 UTC
I don't agree, as when I use Ufraw standalone I have exactly the same problems, i.e. it crashes with 1stDS and works with k-x.

I am using gimp-2.6.9-4.fc13.i686, ufraw-0.17-1.fc13.i686 (Checked again) and I still get Segmentation fault (core dumped) when using ufraw standalone

Comment 18 antonio montagnani 2010-07-07 08:50:28 UTC
how can I debug it to help??? I installed ufraw-debuginfo, and now?? :-)

Comment 19 antonio montagnani 2010-07-07 08:59:56 UTC
 

gdb /usr/bin/ufraw
GNU gdb (GDB) Fedora (7.1-28.fc13)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/ufraw...Reading symbols from /usr/lib/debug/usr/bin/ufraw.debug...done.
done.
(gdb) run
Starting program: /usr/bin/ufraw 
[Thread debugging using libthread_db enabled]
[New Thread 0xb32f3b70 (LWP 6076)]
[New Thread 0xb26ffb70 (LWP 6077)]
[Thread 0xb32f3b70 (LWP 6076) exited]
[New Thread 0xb32f3b70 (LWP 6078)]
[New Thread 0xb1a70b70 (LWP 6079)]
[New Thread 0xb106fb70 (LWP 6080)]
[Thread 0xb106fb70 (LWP 6080) exited]
[Thread 0xb26ffb70 (LWP 6077) exited]
[Thread 0xb32f3b70 (LWP 6078) exited]
[New Thread 0xb32f3b70 (LWP 6081)]
[Thread 0xb1a70b70 (LWP 6079) exited]
[New Thread 0xb1a70b70 (LWP 6082)]
[Thread 0xb32f3b70 (LWP 6081) exited]

Program received signal SIGSEGV, Segmentation fault.
0x0066cd82 in ?? () from /usr/lib/liblensfun.so.0
Missing separate debuginfos, use: debuginfo-install PackageKit-gtk-module-0.6.5-1.fc13.i686 atk-1.30.0-1.fc13.i686 cairo-1.8.10-1.fc13.i686 cfitsio-3.240-3.fc13.i686 dbus-glib-0.86-1.fc13.i686 dbus-libs-1.2.24-1.fc13.i686 exiv2-libs-0.19-1.fc13.i686 expat-2.0.1-10.fc13.i686 fontconfig-2.8.0-1.fc13.i686 freetype-2.3.11-3.fc13.i686 gamin-0.1.10-7.fc13.i686 glib2-2.24.1-1.fc13.i686 glibc-2.12-2.i686 gtk2-2.20.1-1.fc13.i686 gtk2-engines-2.20.1-1.fc13.i686 gtkimageview-1.6.3-2.fc12.i686 gvfs-1.6.2-1.fc13.i686 lcms-libs-1.19-1.fc13.i686 lensfun-0.2.5-1.fc13.i686 libX11-1.3.1-3.fc13.i686 libXau-1.0.5-1.fc12.i686 libXcomposite-0.4.1-2.fc13.i686 libXcursor-1.1.10-4.fc13.i686 libXdamage-1.1.2-2.fc13.i686 libXext-1.1-2.fc13.i686 libXfixes-4.0.4-2.fc13.i686 libXi-1.3-2.fc13.i686 libXinerama-1.1-2.fc13.i686 libXrandr-1.3.0-5.fc13.i686 libXrender-0.9.5-1.fc13.i686 libcanberra-0.24-1.fc13.i686 libcanberra-gtk2-0.24-1.fc13.i686 libgcc-4.4.4-10.fc13.i686 libgomp-4.4.4-10.fc13.i686 libjpeg-6b-46.fc12.i686 libogg-1.2.0-1.fc13.i686 libpng-1.2.44-1.fc13.i686 libselinux-2.0.90-5.fc13.i686 libstdc++-4.4.4-10.fc13.i686 libtdb-1.2.1-2.fc13.i686 libtiff-3.9.4-1.fc13.i686 libtool-ltdl-2.2.6-20.fc13.i686 libudev-151-10.fc13.i686 libvorbis-1.3.1-1.fc13.i686 libxcb-1.5-1.fc13.i686 pango-1.28.0-1.fc13.i686 pixman-0.18.0-1.fc13.i686 zlib-1.2.3-23.fc12.i686
(gdb) 

anything I can do to help???

Comment 20 antonio montagnani 2010-07-07 09:01:13 UTC
backtrace
#0  0x0066cdf2 in ?? () from /usr/lib/liblensfun.so.0
#1  0x0067a125 in lfModifier::AddCoordCallbackDistortion(lfLensCalibDistortion&, bool) () from /usr/lib/liblensfun.so.0
#2  0x0067bb97 in lfModifier::Initialize(lfLens const*, lfPixelFormat, float, float, float, float, lfLensType, int, bool) () from /usr/lib/liblensfun.so.0
#3  0x0806ec2b in UFRaw::ufraw_convert_prepare_transform (uf=0x8387b08, width=
    3040, height=2022, reverse=1, scale=1) at ufraw_lensfun.cc:676
#4  0x0805511d in ufraw_convert_prepare_transform_buffer (uf=0x8387b08, img=
    0x8387c78, width=3040, height=2022) at ufraw_ufraw.c:1360
#5  0x0805581e in ufraw_convert_prepare_buffers (uf=0x8387b08, phase=
    ufraw_transform_phase) at ufraw_ufraw.c:1471
#6  0x08058379 in ufraw_get_image (uf=0x8387b08, phase=ufraw_transform_phase, 
    bufferok=0) at ufraw_ufraw.c:1534
#7  0x0805862d in ufraw_get_image_dimensions (uf=0x8387b08)
    at ufraw_ufraw.c:356
#8  0x08059216 in ufraw_config (uf=0x8387b08, rc=0xbfff46d0, conf=0xbffdeed8, 
    cmd=0xbffe9ad4) at ufraw_ufraw.c:573
#9  0x0809bdfb in ufraw_chooser (rc=0xbfff46d0, conf=0xbffdeed8, cmd=
    0xbffe9ad4, defPath=0x0) at ufraw_chooser.c:156
#10 0x08052eba in main (argc=1, argv=0xbffff394) at ufraw.c:93

Comment 21 antonio montagnani 2010-07-07 09:43:50 UTC
I made a newbie test...I disinstalled everything connected with ufraw (ufraw, ufraw-common, ufraw-gimp, lensfun) and reinstalled them from scratch and surprise, everything seems to be working!!! It seems that they are working also with updates-testing releases.

I will check with my other PC when at home and I will come back.

Tnx for help

Comment 22 Nils Philippsen 2010-07-07 13:18:43 UTC
Hmm, it may just be that one of the installed packages was damaged in some way, or misconfigured (though I don't find any real configuration files in them...), both of which would be fixed by reinstalling a package. Please do check this on your other computer, thanks.

Comment 23 Fedora Update System 2010-07-07 17:36:44 UTC
ufraw-0.17-1.fc13, lensfun-0.2.5-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ufraw lensfun'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/ufraw-0.17-1.fc13,lensfun-0.2.5-1.fc13

Comment 24 antonio montagnani 2010-07-07 18:13:35 UTC
With the same newbie way (full disinstallation and e-installation from scratch) everything seems to work also on the second PC.

Now I have a minor issue, i.e. I don't see thumbnails of PEF files coming from k-x while 1stDS thumbnails seems o.k. (I didn't chek dimensions, that I will do tonight)

Gimp doesn't show thumbnails een when I click on them when file is a PEF file from k-x.

Is this a separate bug???

Comment 25 Nils Philippsen 2010-07-08 15:36:59 UTC
In my experience, thumbnails for raw image files are only generated when first opening them with GIMP. I just verified that I didn't get a thumbnail for either of your files (when put in a new location -- the thumbnails for the old one existed already), then when I opened them in GIMP (or manually generated the thumbnail in the GIMP File Open dialog), I got these thumbnails in GIMP and the file browser (after refreshing the directory).

In principle, this should probably be done in Nautilus itself, the thumbnail is just JPEG wrapped in an EXIF tag that can be directly retrieved from the raw image file using libexif/libexiv2, it doesn't need special software like dcraw/ufraw. Feel free to open an RFE with nautilus ;-).

Comment 26 antonio montagnani 2010-07-28 19:52:25 UTC
after updating to ufraw-gimp-0.17-1.fc13.i686 I am experiencing same problems!!! with 1stDS files....

Comment 27 antonio montagnani 2010-07-28 20:05:45 UTC
 I reverted back to previous ufraw-gimp-0.16-2.fc13.i686 and it seems fine, I do not know if connected to re-installation or downgrading

Comment 28 antonio montagnani 2010-07-28 20:31:48 UTC
I have some choices....

1) stay with ufraw 0.17 and not use my old Pentax 1stDS
2) stay with ufraw 0.16 and shot both with 1stDS and K-x but use DGN files in K-x as 0.16 cannot manage PEF properly (colours are mismatched...)
3) use ufraw in windows ;-)

4) use rawtherapee

Comment 29 antonio montagnani 2010-07-28 22:06:00 UTC
I made a test with ufraw from command line disabling lensfun (--lensfun=none)
and ufraw works great also with Pentax 1stDS PEF files.

I understand that lensfun is disabled in ufraw for Windows, that clarifies why it works in Windows... :-)

Comment 30 antonio montagnani 2010-07-28 22:14:47 UTC
and finally I added lensfun-devel and now everything works!!!.

Nils, I guess that you have it installed on your machines, therefore my file is fine on your machine.

Can you confirm???

Comment 31 Fedora Update System 2010-09-15 05:30:40 UTC
ufraw-0.17-1.fc13, lensfun-0.2.5-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.