question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No metadata in new file when converting CR2 to JPG using the API.

See original GitHub issue

Is your feature request related to a problem? Please describe

Currently if I use the MagickImage API as instructed here, I do have a converted JPG image. However the colors are slightly altered and there is no metadata.

If you look at this image: miCr2 On the right is a jpg that was produced by https://www.online-convert.com. The original CR2 is not in the screenshot I attached but the colors look exactly like the picture on the right.

On the left is the jpg produced by MagickImage, using the following code

var settings = new MagickReadSettings();
settings.Format = MagickFormat.Cr2;
using (MagickImage image = new MagickImage(CR2FilePath, settings))
{
    image.Write(destinationFileName, MagickFormat.Jpg);
}

The file size is smaller, there is no metadata and the colors are altered.

Describe the solution you’d like

I would like the conversion from CR2 to JPG to keep the metadata and the original colors.

Describe alternatives you’ve considered

I have looked at the documentation here but in the API neither the MagickReadSettings nor the MagickImageInfo offer me processing options that can fix my issue.

Additional context

I can submit all my code that uses the API but the lines above are the only MagickImage related ones.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kmgallahancommented, Jul 30, 2020

@Mogrinnar Thanks for reporting this issue, and @dlemstra thanks even more for quickly adding the new settings option. Just ran into this issue and found the solution here. 👍

1reaction
dlemstracommented, Apr 27, 2020

The new API has been published. Hope this works for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Convert Raw image to JPG - python
from PIL import Image file = r"/Downloads/canon_eos_70d_20.CR2" im = Image.open(file) rgb_im = im.convert('RGB') rgb_im.save(file[:-4]+'.
Read more >
How to convert CR2 to JPG or PNG?
cr2 to .jpeg by ufraw. sudo apt-get install ufraw. Right click on the file and select open with ufraw .
Read more >
What metadata does RAW support that TIFF doesn't?
CR2 /CRW format contain "truly RAW" data? 1 · How can I maintain high resolution when converting RAW images to tiff or jpeg?...
Read more >
Re: Reset cr2 metadata to put cr2 files back to ca...
No, Then it´s a montage and not a double exposure. ... But anyway, I haven't done it with CR2 file, but I have...
Read more >
CR2 to JPG Converter
CR2 to JPG Converter - CloudConvert is a free & fast online file conversion ... You can use the options to control image...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found