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.

Failed detecting svg format after upgrading from 7.4.6 to 7.5.0

See original GitHub issue

We have a method which uses Magick.NET to detect image format from its binary header byte[] image = …; MagickImageInfo info = new MagickImageInfo(image); return info.Format;

This used to work while using version 7.4.6 but it fails in version 7.5.0 when image byte array is an svg image. There is an error “no decode delegate for this image format `’ @ error/blob.c/BlobToImage/456”.

I saw that a solution is to pass to MagickImageInfo constructor settings with svg format set but that ruins the whole point of detecting the image format.

How can image format be detected in 7.5.0 from an image stored in a byte array?

And another issue: Same thing but getting format from a stream instead of a byte array now returns “Value cannot be empty. Parameter name: stream” exception while worked fine in 7.4.6.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dlemstracommented, Jul 9, 2018

@guylando The new release has been published. It should now be able to also detect the svg from just the svg tag.

0reactions
guylandocommented, Jul 10, 2018

Seems those exceptions happened while testing in debug mode because of side effects of the watch window. We will do further tests and I will close this if nothing comes up. Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

SVG size issue after update
This was a bug on our part as that filter expects the values of height and width to be an integer.
Read more >
Working with Vector Graphics
This reference guide will provide guidance for working with SVGs in native mobile apps. 2 Optimizing SVGs. When exporting an SVG from an...
Read more >
npm WARN ... requires a peer of ... but none is installed ...
If you are getting this error after updating any package's version then remove node_modules directory and reinstall packages by npm install ...
Read more >
Elasticsearch version 7.4.0
Indices created in 6.x with date and date_nanos fields using formats that are incompatible with java.time patterns will cause parsing errors, incorrect date ......
Read more >
6 Common SVG Fails (and How to Fix Them)
1. The viewBox values. The viewBox is a common point of confusion when working with SVG. It's technically fine to use inline SVG...
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