Skip to content

Commit

Permalink
extract: minor cleanup/drop redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
whatdoineed2do/Ray committed Jan 19, 2024
1 parent 602d1e1 commit 38f20fe
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/extract/imgprextr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -814,20 +814,14 @@ int main(int argc, char* const argv[])
}

/* grab hold of underlying and updated data */
Exiv2::BasicIo& rawio = upd->io();
rawio.seek(0, Exiv2::BasicIo::beg);

Magick::Image img(Magick::Blob(rawio.mmap(), rawio.size()));
Magick::Image img(Magick::Blob(upd->io().mmap(), upd->io().size()));

img.quality(imgqual);

if (convert & CONVERT_OUTPUT_FMT) {
strcat(path, outputfmtExtn.c_str());
img.magick(outputfmt);
}
else {
strcat(path, preview.extension().c_str());
}
strcat(path,
convert & CONVERT_OUTPUT_FMT ?
outputfmtExtn.c_str() :
preview.extension().c_str());

if (access(path, F_OK) == 0 && !overwrite) {
err << filename_ << ": not overwritting existing output";
Expand Down Expand Up @@ -918,7 +912,6 @@ int main(int argc, char* const argv[])
ce->setXmpData(orig->xmpData());

ce->writeMetadata();
ce->io().seek(0, Exiv2::BasicIo::beg);

ci.update(ce->io().mmap(), ce->io().size());

Expand Down

0 comments on commit 38f20fe

Please sign in to comment.