Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
GNOME
gThumb
Commits
e24669a3
Commit
e24669a3
authored
Jul 20, 2011
by
Paolo Bacchilega
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added the dump_exif_data function
useful to find exiv2 bugs
parent
3dda6555
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
extensions/exiv2_tools/exiv2-utils.cpp
extensions/exiv2_tools/exiv2-utils.cpp
+34
-0
No files found.
extensions/exiv2_tools/exiv2-utils.cpp
View file @
e24669a3
...
...
@@ -855,6 +855,40 @@ gth_main_get_metadata_type (gpointer metadata,
}
static
void
dump_exif_data
(
Exiv2
::
ExifData
&
exifData
,
const
char
*
prefix
)
{
std
::
cout
<<
prefix
<<
"
\n
"
;
try
{
if
(
exifData
.
empty
())
{
throw
Exiv2
::
Error
(
1
,
" No Exif data found in the file"
);
}
Exiv2
::
ExifData
::
const_iterator
end
=
exifData
.
end
();
for
(
Exiv2
::
ExifData
::
const_iterator
i
=
exifData
.
begin
();
i
!=
end
;
++
i
)
{
const
char
*
tn
=
i
->
typeName
();
std
::
cout
<<
std
::
setw
(
44
)
<<
std
::
setfill
(
' '
)
<<
std
::
left
<<
i
->
key
()
<<
" "
<<
"0x"
<<
std
::
setw
(
4
)
<<
std
::
setfill
(
'0'
)
<<
std
::
right
<<
std
::
hex
<<
i
->
tag
()
<<
" "
<<
std
::
setw
(
9
)
<<
std
::
setfill
(
' '
)
<<
std
::
left
<<
(
tn
?
tn
:
"Unknown"
)
<<
" "
<<
std
::
dec
<<
std
::
setw
(
3
)
<<
std
::
setfill
(
' '
)
<<
std
::
right
<<
i
->
count
()
<<
" "
<<
std
::
dec
<<
i
->
value
()
<<
"
\n
"
;
}
std
::
cout
<<
"
\n
"
;
}
catch
(
Exiv2
::
Error
&
e
)
{
std
::
cout
<<
"Caught Exiv2 exception '"
<<
e
.
what
()
<<
"'
\n
"
;
return
;
}
}
static
Exiv2
::
DataBuf
exiv2_write_metadata_private
(
Exiv2
::
Image
::
AutoPtr
image
,
GFileInfo
*
info
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment