I would like to add the x265 codec to ImageMagick in a Visual Studio C# project targeting .Net 4.7.2 in order to access HEIC format files. I obtained the file x265.dll from the ShiftMediaProject file libx265_3.4_msvc16.zip from the but I cannot add it to the VS project via Add Reference. I get the message that it is not accessible or not a COM or Assembly component. How can I add x265.dll to my VS project?
Asked
Active
Viewed 176 times
1 Answers
1
I would like to add the x265 codec to ImageMagick in a Visual Studio C# project targeting .Net 4.7.2 in order to access HEIC format files.
In short: you can't. ImageMagick has no way to integrate C#-implemented codecs. Also, just getting a dll doesn't solve using it without API definitions.
ImageMagick, however, in a modern version comes with its own heif codec, so this is all a bit pointless. What you want to achieve is already achieved.

Marcus Müller
- 34,677
- 4
- 53
- 94
-
I'm using ImageMagick 11.2.0.0 but get the message "no encode delegate for this image format 'HEIC' after executing MagickImage image = new MagickImage(sImage); byte[] imageBytes = image.ToByteArray(); . I want to load the HEIC image into a PictureBox background image - is another way of doing this? – Arthur Rees Jul 06 '22 at 04:19
-
Turns out it was the image.ToByteArray() that was the problem. Adding image.Format = MagickFormat.Jpeg before image.ToByteArray() fixed the problem! – Arthur Rees Jul 06 '22 at 04:33