PdfSharpCore icon indicating copy to clipboard operation
PdfSharpCore copied to clipboard

MissingMethodException: Method not found: 'Void SixLabors.ImageSharp.ImageExtensions.SaveAsJpeg

Open mtarlac opened this issue 5 years ago • 6 comments

Hi

I'm facing a problem with jpg images:

....
XImage image = XImage.FromFile(logo);
double x = (250 - image.PixelWidth * 72 / image.HorizontalResolution) / 2;
gfx.DrawImage(image, x, 0);
....

Exception:

MissingMethodException: Method not found: 'Void SixLabors.ImageSharp.ImageExtensions.SaveAsJpeg(SixLabors.ImageSharp.Image`1<!!0>, System.IO.Stream, SixLabors.ImageSharp.Formats.Jpeg.JpegEncoder)'.

The same lines shown above are working fine with png images

PdfSharpCore Version="1.1.18" SixLabors.ImageSharp Version="1.0.0-beta0007" Linux

mtarlac avatar Dec 22 '19 14:12 mtarlac

The latest version (1.1.20) but still facing the same problem

png images are working fine but when I try to add jpg/jpeg image, the exception jumps out

mtarlac avatar Jan 20 '20 20:01 mtarlac

We're also getting this. Tried to pin ImageSharp to the earlier beta referenced by the PdfSharpCore project file, as I'd wondered if this was using reflection and blindly calling a method that no longer existed, but didn't seem to help.

sychare avatar Jan 21 '20 16:01 sychare

Any news? PdfSharpCore Version="1.1.21" and the problem still exists

mtarlac avatar Jan 28 '20 22:01 mtarlac

We're also getting this. Tried to pin ImageSharp to the earlier beta referenced by the PdfSharpCore project file, as I'd wondered if this was using reflection and blindly calling a method that no longer existed, but didn't seem to help.

Me helped rollback to SixLabours.Image beta-0006 (on all projects of Solution)

caxepok avatar Feb 12 '20 20:02 caxepok

Thanks It works fine with SixLabors.ImageSharp 1.0.0-beta0006 SixLabors.ImageSharp.Drawing 1.0.0-beta0006

mtarlac avatar Feb 12 '20 22:02 mtarlac

here the same problem, also with using SixLabors.ImageSharp 1.0.0-beta0006. PNG works fine, but no JPG, BMP, TIFF, GIF

bierlos avatar Feb 19 '20 15:02 bierlos