Search found 17 matches

by superstator
2019-08-26T16:58:22-07:00
Forum: Magick.NET
Topic: Grayscale JPG colortype
Replies: 1
Views: 73847

Grayscale JPG colortype

I am using Magick.NET Q8 to work with a variety of images from .NET, and I've noticed that when loading an 8-bit grayscale JPG it reports the ColorType as Palette, with a ColormapSize of 256. To the best of my knowledge, JPEG doesn't support any palette color, and 8-bit grayscale really is stored as ...
by superstator
2018-01-21T23:40:52-07:00
Forum: Magick.NET
Topic: Exception thrown on Linux
Replies: 5
Views: 16457

Re: Exception thrown on Linux

Do you have any opinions about which format delegates and compression libraries to build in? I have it working with zlib, libjpeg-turbo, libtiff5, libpng16, and libwebp. Anything else you definitely do (or do not) want to see supported out of the box? LZMA, BZ2, etc? I've also waffled a little about ...
by superstator
2018-01-14T12:13:01-07:00
Forum: Magick.NET
Topic: Exception thrown on Linux
Replies: 5
Views: 16457

Re: Exception thrown on Linux

I want to do a little more testing on my end first, but I'll send you a PR soon, hopefully this week.
by superstator
2018-01-12T16:09:20-07:00
Forum: Magick.NET
Topic: Exception thrown on Linux
Replies: 5
Views: 16457

Re: Exception thrown on Linux

I have a proof of concept static version of Magick.NET-Q8-x64.Native.dll.so working now on my system. In a nutshell, the Dockerfile for building the base ImageMagick library needed tweaking to let the format delegates build correctly, and then I was able to just add a flag to compile PIC (which ...
by superstator
2018-01-11T12:04:17-07:00
Forum: Magick.NET
Topic: Exception thrown on Linux
Replies: 5
Views: 16457

Re: Exception thrown on Linux

Continuing to poke at this, and it seems to all come down to DLL-hell (or, so-hell, I suppose). I have the Magick.NET.Native library loading, but the underlying ImageMagick libraries are still failing with 'ImageMagick.MagickMissingDelegateErrorException: no decode delegate for this image format ...
by superstator
2018-01-08T16:38:20-07:00
Forum: Magick.NET
Topic: Exception thrown on Linux
Replies: 5
Views: 16457

Exception thrown on Linux

When loading an image on Linux (Ubuntu 16.04) under .Net Core, I'm getting an exception: Unable to load DLL 'Magick.NET-Q8-x64.Native.dll': The specified module or one of its dependencies could not be found.\n (Exception from HRESULT: 0x8007007E) I am using Q8-AnyCPU 7.3. I see there is a Magick.NET ...
by superstator
2017-12-14T16:42:33-07:00
Forum: Magick.NET
Topic: EXIF data lost on save
Replies: 6
Views: 22782

Re: EXIF data lost on save

It would be a worthwhile project someday to try and do a faithful port of Exiftool to something more modern (or at least more interop friendly) than Perl 5. Today is probably not the day :) . I've got a working C# Exif copier now. IM/libtiff is stripping a few other non-Exif related tags as well, so ...
by superstator
2017-12-14T15:03:29-07:00
Forum: Magick.NET
Topic: EXIF data lost on save
Replies: 6
Views: 22782

Re: EXIF data lost on save

We've used exiftool in the past as a workaround, but being Perl based you're stuck with some ugly hacks to make it work reliably in .NET Core. Just to summarize what I've learned since, this is a problem with libtiff rather than ImageMagick. Libtiff (and it's derivatives) is deeply broken when it ...
by superstator
2017-12-13T13:32:55-07:00
Forum: Magick.NET
Topic: EXIF data lost on save
Replies: 6
Views: 22782

Re: EXIF data lost on save

Well, reading http://www.imagemagick.org/discourse-server/viewtopic.php?t=30518 it sounds like people just gave up on writing Exif to TIFFs with ImageMagick. Unfortunately preserving metadata is a hard requirement for us, so I'll have to look at alternatives. Fingers crossed we can just use LibTiff ...
by superstator
2017-12-13T13:08:24-07:00
Forum: Magick.NET
Topic: EXIF data lost on save
Replies: 6
Views: 22782

EXIF data lost on save

When saving a TIFF, it seems EXIF data is being scrubbed. Is there a way to prevent this? I've come across some discussions about this with the command line tools that suggested using the "-define exif-properties=true" option, but haven't had any luck with it or the Magick.NET equivalent. It is ...
by superstator
2017-12-12T13:59:07-07:00
Forum: Magick.NET
Topic: Accessing raw image data
Replies: 13
Views: 27630

Re: Accessing raw image data

Another puzzle: For a grayscale JPEG, Magick.NET is reporting a ColorSpace of Gray, and the Channels collection on MagickImage has only a single value (Channel 0), as expected. However, ChannelCount == 2, and if I take GetPixels().ToArray() I get 2 channels worth of image data, with two identical ...
by superstator
2017-12-11T16:33:47-07:00
Forum: Magick.NET
Topic: Accessing raw image data
Replies: 13
Views: 27630

Re: Accessing raw image data

Sure, that's what I'd expect, and I can understand why dlemstra might not want to pack the PixelChannel enum with every possible permutation for every colorspace. I just want to make sure I'm making reasonable assumptions before I hardcode them in.
by superstator
2017-12-11T15:49:32-07:00
Forum: Magick.NET
Topic: Accessing raw image data
Replies: 13
Views: 27630

Re: Accessing raw image data

How about LAB? PixelChannel doesn't seem to cover LAB/YCbCr/etc, but my LAB samples seem to reliably load into channels 0-2 anyway.
by superstator
2017-12-11T13:35:01-07:00
Forum: Magick.NET
Topic: Accessing raw image data
Replies: 13
Views: 27630

Re: Accessing raw image data

Gotcha. So, can I assume then that the underlying byte order will always be fixed for a given ColorSpace? IE, it will always be RGB or RGBA, and never BGR or ARGB, etc? Or is there another lookup to map a Channel index to a position in the byte order?
by superstator
2017-12-11T11:20:07-07:00
Forum: Magick.NET
Topic: Accessing raw image data
Replies: 13
Views: 27630

Re: Accessing raw image data

So, the call to SetPixels() needs to have the bytes in the original channel order? That should be doable, if I can get the order reliably. Looking at the .Channels collection, it seems a little funky. For a grayscale image, it reports a single Cyan channel. For an sRGB it reports Cyan, Green, and ...