SHA256
1
0
forked from pool/dcraw

Accepting request 288278 from graphics

1

OBS-URL: https://build.opensuse.org/request/show/288278
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dcraw?expand=0&rev=34
This commit is contained in:
Dominique Leuenberger 2015-03-03 10:12:30 +00:00 committed by Git OBS Bridge
commit f29fe8ae8e
6 changed files with 305 additions and 126 deletions

258
README
View File

@ -71,7 +71,7 @@ http://www.cybercom.net/~dcoffin/dcraw/:
execute permission.
* [17]dcraw.c -- decodes raw photos, extracts thumbnails, and
displays metadata
Supports 598 cameras at last count. Compile with "gcc -o dcraw -O4
Supports 628 cameras at last count. Compile with "gcc -o dcraw -O4
dcraw.c -lm -ljasper -ljpeg -llcms2" or "gcc -o dcraw -O4 dcraw.c
-lm -DNODEPS". Run with no arguments to see a usage message. Don't
complain that 16-bit output is too dark -- read the [18]FAQ!
@ -113,14 +113,14 @@ http://www.cybercom.net/~dcoffin/dcraw/:
currently supported languages are [33]Esperanto, [34]Russian,
[35]French, [36]Italian, [37]German, [38]Portuguese, [39]Spanish,
[40]Dutch, [41]Polish, [42]Hungarian, [43]Czech, [44]Swedish,
[45]Catalan, [46]Danish, and Chinese (both [47]Traditional and
[48]Simplified).
[45]Catalan, [46]Danish, [47]Romanian, and Chinese (both
[48]Traditional and [49]Simplified).
To build a unilingual, self-contained DCRAW.EXE for DOS/Windows, use a
source file [49]from this directory instead.
source file [50]from this directory instead.
To add another language, send me translations of [50]this manpage and
[51]this message table in UTF-8 encoding. Translate only from my
To add another language, send me translations of [51]this manpage and
[52]this message table in UTF-8 encoding. Translate only from my
original English and Esperanto texts -- other languages may contain
factual errors invisible to me.
@ -151,61 +151,61 @@ http://www.cybercom.net/~dcoffin/dcraw/:
digital cameras in their applications. They can call dcraw from a
graphical interface, paste pieces of dcraw.c into their code, or just
use dcraw.c as the documentation that camera makers refuse to provide:
* [52]ACDSee
* [53]Adobe Photoshop
* [54]BR's PhotoArchiver by Baard Riiber
* [55]BreezeBrowser by Chris Breeze
* [56]Conceiva Lightbox
* [57]cPicture by Jürgen Eidt
* [58]Cumulus by Canto
* [59]dcRAW-X by Bryan Chang
* [60]DCRawUI by Sune Trudslev
* [61]Directory Opus Plugin by Leo Davidson(with C++ source code)
* [62]DeepSkyStacker by Luc Coiffier
* [63]dpMagic by Mikhail Stolpner
* [64]GraphicConverter by Thorsten Lemke
* [65]GTKRawGallery by Daniele Isca
* [66]GVBox from JCO Consulting
* [67]HDR Shop
* [68]ImageLab from Aragon System
* [69]Imagina by Rob Baker
* [70]IrfanView by Irfan Skiljan
* [71]IRIS image processor for astronomers
* [72]Lightbox by Josh Anon
* [73]LightZone by Anton Kast
* [74]LRViewer by Marc Rochkind
* [75]MediaRECOVER File Recovery Software
* [76]Mixpo by Mixpo Portfolio Broadcasting Inc.
* [77]Photo Acute by Almalence
* [78]Photo Companion by Jeff Moore
* [79]Photo Jockey by Davie Lee Reed who also wrote a [80]dcraw
* [53]ACDSee
* [54]Adobe Photoshop
* [55]BR's PhotoArchiver by Baard Riiber
* [56]BreezeBrowser by Chris Breeze
* [57]Conceiva Lightbox
* [58]cPicture by Jürgen Eidt
* [59]Cumulus by Canto
* [60]dcRAW-X by Bryan Chang
* [61]DCRawUI by Sune Trudslev
* [62]Directory Opus Plugin by Leo Davidson(with C++ source code)
* [63]DeepSkyStacker by Luc Coiffier
* [64]dpMagic by Mikhail Stolpner
* [65]GraphicConverter by Thorsten Lemke
* [66]GTKRawGallery by Daniele Isca
* [67]GVBox from JCO Consulting
* [68]HDR Shop
* [69]ImageLab from Aragon System
* [70]Imagina by Rob Baker
* [71]IrfanView by Irfan Skiljan
* [72]IRIS image processor for astronomers
* [73]Lightbox by Josh Anon
* [74]LightZone by Anton Kast
* [75]LRViewer by Marc Rochkind
* [76]MediaRECOVER File Recovery Software
* [77]Mixpo by Mixpo Portfolio Broadcasting Inc.
* [78]Photo Acute by Almalence
* [79]Photo Companion by Jeff Moore
* [80]Photo Jockey by Davie Lee Reed who also wrote a [81]dcraw
interface for Delphi programmers.
* [81]Photo Organizer by Balint Kis
* [82]PhotoRescue from DataRescue
* [83]PhotoReviewer by Ben Haller
* [84]Photovault by Harri Kaimio
* [85]Picasa from Google
* [86]Picture Arena by Felix Schwarz
* [87]PixInsight by Pleiades Software
* [88]PolyView by Polybytes
* [89]RAW Developer by Iridient Digital
* [90]Raw Magick
* [91]RawDrop by Frank Siegert
* [92]RawTherapee by RT Team
* [93]Serif PhotoPlus, PanoramaPlus, and AlbumPlus
* [94]SharpRaw by Duane DeSieno
* [95]SilverFast DCPro by LaserSoft Imaging
* [96]StudioLine Photo by H&M Software
* [97]ViewIt by Zdzislaw Losvik
* [98]Viewer n5 by Dmitry Fedorov
* [99]VueScan by Ed Hamrick
* [100]Xara Xtreme Pro
* [82]Photo Organizer by Balint Kis
* [83]PhotoRescue from DataRescue
* [84]PhotoReviewer by Ben Haller
* [85]Photovault by Harri Kaimio
* [86]Picasa from Google
* [87]Picture Arena by Felix Schwarz
* [88]PixInsight by Pleiades Software
* [89]PolyView by Polybytes
* [90]RAW Developer by Iridient Digital
* [91]Raw Magick
* [92]RawDrop by Frank Siegert
* [93]RawTherapee by RT Team
* [94]Serif PhotoPlus, PanoramaPlus, and AlbumPlus
* [95]SharpRaw by Duane DeSieno
* [96]SilverFast DCPro by LaserSoft Imaging
* [97]StudioLine Photo by H&M Software
* [98]ViewIt by Zdzislaw Losvik
* [99]Viewer n5 by Dmitry Fedorov
* [100]VueScan by Ed Hamrick
* [101]Xara Xtreme Pro
Frequently Asked Questions
I don't have a C compiler. Could you send me an executable?
[101]Here's an untested Windows EXE I built with [102]MinGW.
Dcraw has also been ported to [103]Amiga, [104]MorphOS,
Sergio Namias has built [102]some current Windows EXE files
here. Dcraw has also been ported to [103]Amiga, [104]MorphOS,
[105]BeOS, [106]OS/2, and [107]RISC OS.
Why does dcraw say "Out of memory" in Windows Vista?
@ -410,6 +410,7 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Canon PowerShot G5
* Canon PowerShot G6
* Canon PowerShot G7 (CHDK hack)
* Canon PowerShot G7 X
* Canon PowerShot G9
* Canon PowerShot G10
* Canon PowerShot G11
@ -438,6 +439,7 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Canon PowerShot SX20 IS (CHDK hack)
* Canon PowerShot SX30 IS (CHDK hack)
* Canon PowerShot SX50 HS
* Canon PowerShot SX60 HS
* Canon EOS D30
* Canon EOS D60
* Canon EOS 5D
@ -445,6 +447,7 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Canon EOS 5D Mark III
* Canon EOS 6D
* Canon EOS 7D
* Canon EOS 7D Mark II
* Canon EOS 10D
* Canon EOS 20D
* Canon EOS 30D
@ -512,6 +515,7 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Fuji E900
* Fuji F700
* Fuji F710
* Fuji S1
* Fuji S2Pro
* Fuji S3Pro
* Fuji S5Pro
@ -546,8 +550,10 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Fuji XQ1
* Fuji X100
* Fuji X100s
* Fuji X100T
* Fuji X10
* Fuji X20
* Fuji X30
* Fuji IS-1
* Hasselblad CFV
* Hasselblad H3D
@ -568,6 +574,7 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Kodak DCS420
* Kodak DCS460
* Kodak DCS460A
* Kodak DCS460D
* Kodak DCS520C
* Kodak DCS560C
* Kodak DCS620C
@ -624,18 +631,24 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Leica D-LUX4
* Leica D-LUX5
* Leica D-LUX6
* Leica D-LUX (Typ 109)
* Leica M (Typ 240)
* Leica M Monochrom
* Leica M8
* Leica M9
* Leica R8
* Leica T (Typ 701)
* Leica V-LUX1
* Leica V-LUX2
* Leica V-LUX3
* Leica V-LUX4
* Leica V-LUX (Typ 114)
* Leica X VARIO (Typ 107)
* Leica X1
* Leica X2
* Leica X (Typ 113)
* Leica X-E (Typ 102)
* Lenovo A820
* Logitech Fotoman Pixtura
* Mamiya ZD
* Matrix 4608x3288
@ -684,6 +697,8 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Nikon D600
* Nikon D610
* Nikon D700
* Nikon D750
* Nikon D810
* Nikon D3000
* Nikon D3100
* Nikon D3200
@ -701,6 +716,7 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Nikon 1 J1
* Nikon 1 J2
* Nikon 1 J3
* Nikon 1 J4
* Nikon 1 S1
* Nikon 1 V1
* Nikon 1 V2
@ -736,6 +752,7 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Nokia N95
* Nokia X2
* Nokia 1200x1600
* Nokia Lumia 1020
* Olympus C3030Z
* Olympus C5050Z
* Olympus C5060WZ
@ -772,6 +789,7 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Olympus E-PL2
* Olympus E-PL3
* Olympus E-PL5
* Olympus E-PL7
* Olympus E-PM1
* Olympus E-PM2
* Olympus SP310
@ -787,6 +805,7 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Olympus XZ-2
* Olympus XZ-10
* OmniVision OV5647 (Raspberry Pi)
* Panasonic DMC-CM1
* Panasonic DMC-FZ8
* Panasonic DMC-FZ18
* Panasonic DMC-FZ28
@ -815,6 +834,7 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Panasonic DMC-GH3
* Panasonic DMC-GH4
* Panasonic DMC-GM1
* Panasonic DMC-GM5
* Panasonic DMC-GX1
* Panasonic DMC-GX7
* Panasonic DMC-L1
@ -826,6 +846,7 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Panasonic DMC-LX3
* Panasonic DMC-LX5
* Panasonic DMC-LX7
* Panasonic DMC-LX100
* Panasonic DMC-TZ61
* Panasonic DMC-ZS40
* Pentax *ist D
@ -849,12 +870,14 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Pentax K-50
* Pentax K-500
* Pentax K-7
* Pentax K-S1
* Pentax Optio S
* Pentax Optio S4
* Pentax Optio 33WR
* Pentax Optio 750Z
* Pentax Q7
* Pentax 645D
* Pentax 645Z
* Phase One LightPhase
* Phase One H 10
* Phase One H 20
@ -879,6 +902,7 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Samsung GX-1S
* Samsung GX10
* Samsung GX20
* Samsung NX1
* Samsung NX10
* Samsung NX11
* Samsung NX100
@ -887,9 +911,11 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Samsung NX210
* Samsung NX30
* Samsung NX300
* Samsung NX300M
* Samsung NX1000
* Samsung NX1100
* Samsung NX2000
* Samsung NX3000
* Samsung NX mini
* Samsung WB550
* Samsung WB2000
@ -924,6 +950,7 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Sony DSC-RX10
* Sony DSC-RX100
* Sony DSC-RX100M2
* Sony DSC-RX100M3
* Sony DSC-V3
* Sony DSLR-A100
* Sony DSLR-A200
@ -941,12 +968,15 @@ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
* Sony DSLR-A850
* Sony DSLR-A900
* Sony ILCA-77M2
* Sony ILCE-7M2
* Sony ILCE-7
* Sony ILCE-7R
* Sony ILCE-7S
* Sony ILCE-3000
* Sony ILCE-5000
* Sony ILCE-5100
* Sony ILCE-6000
* Sony ILCE-QX1
* Sony NEX-3
* Sony NEX-3N
* Sony NEX-5
@ -1018,63 +1048,63 @@ References
44. http://www.cybercom.net/~dcoffin/dcraw/dcraw_sv.1.html
45. http://www.cybercom.net/~dcoffin/dcraw/dcraw_ca.1.html
46. http://www.cybercom.net/~dcoffin/dcraw/dcraw_da.1.html
47. http://www.cybercom.net/~dcoffin/dcraw/dcraw_zh_TW.1.html
48. http://www.cybercom.net/~dcoffin/dcraw/dcraw_zh_CN.1.html
49. http://www.cybercom.net/~dcoffin/dcraw/msdos/
50. http://www.cybercom.net/~dcoffin/dcraw/dcraw.1
51. http://www.cybercom.net/~dcoffin/dcraw/dcraw_eo.po
52. http://www.acdsystems.com/
53. http://www.adobe.com/products/photoshop/cameraraw.html
54. http://www.br-software.com/
55. http://www.breezesys.com/
56. http://www.conceiva.com/
57. http://cpicture.net/en/t_raw.html
58. http://www.canto.com/
59. http://frostyplace.com/dcraw/
60. http://www.tanis.dk/wiki/index.php/DCRawUI
61. http://www.pretentiousname.com/jp2raw/
62. http://deepskystacker.free.fr/
63. http://www.dpmagic.com/
64. http://www.lemkesoft.com/
65. http://sourceforge.net/projects/gtkrawgallery/
66. http://jcoconsulting.com/index.asp?Section=GVOCX
67. http://www.hdrshop.com/
68. http://www.aragonsystem.com/
69. http://www.planetimagina.com/
70. http://www.irfanview.com/
71. http://www.astrosurf.com/buil/us/iris/iris.htm
72. http://www.lightboxsoftware.com/
73. http://www.lightcrafts.com/
74. http://imageingester.com/
75. http://www.mediarecover.com/
76. http://www.mixpo.com/
77. http://www.photoacute.com/
78. http://www.wildcape.com/
79. http://photojockey.com/
80. http://smatters.com/dcraw/
81. http://www.k-i-s.net/
82. http://www.datarescue.com/photorescue/
83. http://www.sticksoftware.com/software/PhotoReviewer.html
84. http://www.photovault.org/
85. http://www.picasa.com/
86. http://www.picturearena.com/
87. http://pleiades-astrophoto.com/
88. http://www.polybytes.com/
89. http://www.iridientdigital.com/
90. http://www.rawmagick.com/
91. http://www.wizards.de/rawdrop
92. http://www.rawtherapee.com/
93. http://www.serif.com/
94. http://www.logicaldesigns.com/
95. http://www.silverfast.com/
96. http://www.studioline.net/
97. http://www.hexcat.com/viewit/
98. http://www.dimin.net/software/viewer/
99. http://www.hamrick.com/
100. http://www.xara.com/products/xtreme/
101. http://www.cybercom.net/~dcoffin/dcraw/dcraw.exe
102. http://www.mingw.org/
103. http://aminet.net/search?query=dcraw
47. http://www.cybercom.net/~dcoffin/dcraw/dcraw_ro.1.html
48. http://www.cybercom.net/~dcoffin/dcraw/dcraw_zh_TW.1.html
49. http://www.cybercom.net/~dcoffin/dcraw/dcraw_zh_CN.1.html
50. http://www.cybercom.net/~dcoffin/dcraw/msdos/
51. http://www.cybercom.net/~dcoffin/dcraw/dcraw.1
52. http://www.cybercom.net/~dcoffin/dcraw/dcraw_eo.po
53. http://www.acdsystems.com/
54. http://www.adobe.com/products/photoshop/cameraraw.html
55. http://www.br-software.com/
56. http://www.breezesys.com/
57. http://www.conceiva.com/
58. http://cpicture.net/en/t_raw.html
59. http://www.canto.com/
60. http://frostyplace.com/dcraw/
61. http://www.tanis.dk/wiki/index.php/DCRawUI
62. http://www.pretentiousname.com/jp2raw/
63. http://deepskystacker.free.fr/
64. http://www.dpmagic.com/
65. http://www.lemkesoft.com/
66. http://sourceforge.net/projects/gtkrawgallery/
67. http://jcoconsulting.com/index.asp?Section=GVOCX
68. http://www.hdrshop.com/
69. http://www.aragonsystem.com/
70. http://www.planetimagina.com/
71. http://www.irfanview.com/
72. http://www.astrosurf.com/buil/us/iris/iris.htm
73. http://www.lightboxsoftware.com/
74. http://www.lightcrafts.com/
75. http://imageingester.com/
76. http://www.mediarecover.com/
77. http://www.mixpo.com/
78. http://www.photoacute.com/
79. http://www.wildcape.com/
80. http://photojockey.com/
81. http://smatters.com/dcraw/
82. http://www.k-i-s.net/
83. http://www.datarescue.com/photorescue/
84. http://www.sticksoftware.com/software/PhotoReviewer.html
85. http://www.photovault.org/
86. http://www.picasa.com/
87. http://www.picturearena.com/
88. http://pleiades-astrophoto.com/
89. http://www.polybytes.com/
90. http://www.iridientdigital.com/
91. http://www.rawmagick.com/
92. http://www.wizards.de/rawdrop
93. http://www.rawtherapee.com/
94. http://www.serif.com/
95. http://www.logicaldesigns.com/
96. http://www.silverfast.com/
97. http://www.studioline.net/
98. http://www.hexcat.com/viewit/
99. http://www.dimin.net/software/viewer/
100. http://www.hamrick.com/
101. http://www.xara.com/products/xtreme/
102. http://www.centrostudiprogressofotografico.it/en/dcraw/
103. http://os4depot.net/index.php?function=showfile&file=graphics/convert/dcraw.lha
104. http://morphos-files.ppa.pl/find.php?find=dcraw
105. http://www.pidcock.co.uk/beos/index.html
106. http://hobbes.nmsu.edu/h-search.php?key=dcraw
@ -1121,7 +1151,7 @@ References
147. http://www.megaupload.com/
148. http://www.targets.coloraid.de/
149. http://www.calibr8.com/
150. http://www.cmp-color.fr/eng%20digital%20target.html
150. http://www.cmp-color.fr/eng digital target.html
151. http://www.xrite.com/product_overview.aspx?ID=820
152. http://www.adobe.com/products/dng/
153. http://archiv.arri.de/arriraw/index.html

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0290aef2dc60fe434f8ecadf5f158c1c657c1d18b1adc6a91d33e5925d41bf01
size 344867

3
dcraw-9.24.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:20387ee8d99e23c5832989a4fedb8fb0dec675bb1e396e73e02cd6ade96036d3
size 180882

View File

@ -1,3 +1,33 @@
-------------------------------------------------------------------
Fri Feb 27 22:05:35 UTC 2015 - asterios.dramis@gmail.com
- Update to version 9.24.2:
dcraw - revision 1.473
* Canon multi-exposure files are already white-balanced.
* Moved border_interpolate() to the end of xtrans_interpolate().
From version 9.24.1:
* No visible changes.
From version 9.24.0:
dcraw - revision 1.471
* Support all format options of the Nikon D4S and D810.
* Guess which filter pattern OmniVision cameras use.
dcparse - revision 1.77
* Display OmniVision's MakerNote.
From version 9.23.0:
dcraw - revision 1.470
* Fixed data errors with Olympus E-M5MarkII HR images.
* Support the Lenovo A820.
* Copied color matrices from DNG Converter 8.7.1.
* Support pre-release Sonys and Canons that lack a proper model
name.
* Support the Samsung NX1 (yet another compression algorithm).
* Read camera white balance in all professional Kodak cameras.
* Reduced zippering in Fuji X-Trans interpolation.
* Support YCbCr files from the Kodak C330.
* Support Hasselblad multi-shot files.
dcparse - revision 1.76
* Parse Redcine and Canon EOS QuickTime movies.
-------------------------------------------------------------------
Tue Jul 15 17:59:16 UTC 2014 - asterios.dramis@gmail.com

View File

@ -1,7 +1,7 @@
#
# spec file for package dcraw
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,7 +17,7 @@
Name: dcraw
Version: 9.22
Version: 9.24.2
Release: 0
Summary: Raw Digital Photo Decoding
License: GPL-2.0+
@ -26,7 +26,7 @@ Url: http://www.cybercom.net/~dcoffin/dcraw/
#*** NOTE: run "sh update_dcraw" to update to latest version of the following sources ("wget", "rcs" and "lynx" packages are required for the update).
Source0: http://www.cybercom.net/~dcoffin/dcraw/archive/%{name}-%{version}.tar.gz
Source1: README
#DL-URL: http://www.cybercom.net/~dcoffin/dcraw/.badpixels
# http://www.cybercom.net/~dcoffin/dcraw/.badpixels
Source2: badpixels
Source3: http://www.cybercom.net/~dcoffin/dcraw/clean_crw.c
Source4: http://www.cybercom.net/~dcoffin/dcraw/fuji_green.c
@ -141,6 +141,8 @@ mv badpixels .badpixels
%dir %{_mandir}/pl/man1
%dir %{_mandir}/pt
%dir %{_mandir}/pt/man1
%dir %{_mandir}/ro
%dir %{_mandir}/ro/man1
%dir %{_mandir}/sv
%dir %{_mandir}/sv/man1
%dir %{_mandir}/zh_CN

129
parse.c
View File

@ -1,12 +1,12 @@
/*
Raw Photo Parser
Copyright 2004-2014 by Dave Coffin, dcoffin a cybercom o net
Copyright 2004-2015 by Dave Coffin, dcoffin a cybercom o net
This program displays raw metadata for all raw photo formats.
It is free for all uses.
$Revision: 1.75 $
$Date: 2014/01/14 20:40:01 $
$Revision: 1.77 $
$Date: 2015/02/14 00:17:36 $
*/
#include <stdio.h>
@ -234,7 +234,7 @@ void nikon_decrypt (uchar ci, uchar cj, int tag, int i, int size, uchar *buf)
int parse_tiff_ifd (int base, int level);
void parse_makernote (int base, int level)
void parse_makernote (int base, int len, int level)
{
int offset=0, entries, tag, type, count, val, save;
unsigned serial=0, key=0;
@ -279,6 +279,10 @@ nf: order = 0x4949;
fseek (ifp, -10, SEEK_CUR);
if (!strncmp(make,"SAMSUNG",7))
base = ftell(ifp);
if (!strncmp (buf,"ev=",3)) {
while (len--) putchar (fgetc(ifp));
putchar ('\n');
}
}
entries = get2();
@ -337,7 +341,7 @@ void parse_exif (int base, int level)
count= get4();
tiff_dump (base, tag, type, count, level);
if (tag == 0x927c)
parse_makernote (base, level+1);
parse_makernote (base, count, level+1);
fseek (ifp, save+12, SEEK_SET);
}
}
@ -1030,6 +1034,114 @@ void parse_phase_one (int base)
}
}
void parse_uuid (int level)
{
unsigned i, len, tag;
char buf[0x8000];
for (;;) {
len = get2();
tag = get2();
if (!len) break;
printf ("%*stag = 0x%x, len=%d, ", level*2, "", tag, len);
switch (tag >> 12) {
case 1:
if (len-4 < sizeof buf) {
fread (buf, 1,len-4, ifp);
printf ("\"%.*s\"", len-4, buf);
}
break;
case 2:
for (i=4; i < len; i+=4)
printf ("%f ",int_to_float(get4()));
break;
default:
for (i=4; i < len; i++)
printf ("%02x", getc(ifp));
}
putchar ('\n');
}
}
void parse_redcine (off_t base, int level)
{
unsigned i, len, tag, ulen, utag;
char c, ctag[4], buf[0x8000];
do {
fseeko (ifp, base, SEEK_SET);
len = get4();
tag = get4();
if (feof(ifp)) break;
for (i=0; i < 4; i++) {
ctag[i] = tag >> ((3-i) << 3);
if (!isprint(ctag[i])) ctag[i] = '.';
}
printf ("%*soff=0x%llx, len=%d, tag=0x%x \"%.4s\"\n",
level*2, "", (INT64) base, len, tag, ctag);
switch (tag) {
case 0x52454431: /* RED1 */
fseek (ifp, 59, SEEK_CUR);
fread (buf, 1, 256, ifp);
printf (" Original name: %s\n", buf);
break;
case 0x52454432: /* RED2 */
fseek (ifp, 18, SEEK_CUR);
case 0x52444901: /* RDI */
fseek (ifp, 88, SEEK_CUR);
parse_uuid (level+1);
base = -(-(base+len) & -4096);
continue;
#if 0
case 0x52454441: /* REDA */
fread (buf, 1, sizeof buf, ifp);
fwrite (buf+24, 1, len-32, stdout);
break;
#endif
case 0x52454456: /* REDV */
printf (" seq = %d, time = %d\n", get4(), get4());
parse_redcine (base+20, level+1);
break;
case 0x75756964: /* uuid */
fseek (ifp, 16, SEEK_CUR);
parse_uuid (level+1);
}
base += len;
} while (len);
}
void parse_qt (int level, int end)
{
unsigned i, lcase, size, save;
char tag[4], buf[64];
order = 0x4d4d;
while (ftell(ifp)+7 < end) {
save = ftell(ifp);
if ((size = get4()) < 8) return;
fread (tag, 4, 1, ifp);
printf ("%*.4s size %d", level*4+4, tag, size);
for (lcase=1, i=0; i < 4; i++)
if (!islower(tag[i])) lcase = 0;
if (lcase && memcmp(tag,"ftyp",4) && memcmp(tag,"tkhd",4)
&& memcmp(tag,"mdat",4)
|| !memcmp(tag,"CNOP",4) || !memcmp(tag,"CNTH",4)) {
putchar ('\n');
parse_qt (level+1, save+size);
} else if (!memcmp(tag,"CNDA",4)) {
puts (" *** parsing JPEG thumbnail ...");
parse_jpeg (ftell(ifp));
} else {
fread (buf, 1, 40, ifp);
printf (" : ");
for (i=0; i < 40 && i < size-8; i++)
putchar (isprint(buf[i]) ? buf[i] : '.');
putchar ('\n');
}
fseek (ifp, save+size, SEEK_SET);
}
}
char *memmem (char *haystack, size_t haystacklen,
char *needle, size_t needlelen)
{
@ -1086,7 +1198,12 @@ void identify()
} else if (!memcmp (head,"RIFF",4)) {
fseek (ifp, 0, SEEK_SET);
parse_riff(0);
} else if (!memcmp (head,"DSC-Image",9))
} else if (!memcmp (head+4,"ftypqt ",9)) {
fseek (ifp, 0, SEEK_SET);
parse_qt (0, fsize);
} else if (!memcmp (head+4,"RED",3))
parse_redcine(0,0);
else if (!memcmp (head,"DSC-Image",9))
parse_rollei();
else if (!memcmp (head,"FOVb",4))
parse_foveon();