Questions tagged [imagesharp]

A cross-platform library for the processing of image files; written in C#

ImageSharp is a new, fully featured, fully managed, cross-platform, 2D graphics API.

Designed to democratize image processing, ImageSharp brings you an incredibly powerful yet beautifully simple API.

Compared to System.Drawing we have been able to develop something much more flexible, easier to code against, and much, much less prone to memory leaks. Gone are system-wide process-locks; ImageSharp images are thread-safe and fully supported in web environments.

Built against .Net Standard 1.1 ImageSharp can be used in device, cloud, and embedded/IoT scenarios.

Documentation and Code Respository

https://sixlabors.github.io/docs/

https://github.com/SixLabors/ImageSharp

164 questions
0
votes
0 answers

How can i convert YCbCr to BGR24 using ImageISharp

I get an image in IntPtr or an array of bytes in the YUV420 color space. How can I use ImageSharp to convert an image to BGR4 color space? I can't find conversion examples anywhere with imageSharp . Therefore I use other library for conversion. But…
zerpico
  • 103
  • 3
0
votes
0 answers

Convert FFMpegCore Bitmap to Stream on Linux

I have a DotNet Core 7 app, which utilises the rather wonderful FFMpegCore by Malte Rosenbjerg to get snapshots of video using FFMpeg. I'm converting my app to run on Linux, but the FFMpeg.Snapshot function returns a System.Drawing.Bitmap, and the…
Dunc
  • 31
  • 6
0
votes
1 answer

VB.NET - Problem with transparent background PNG and ImageSharp quantizer

I am trying to make a WinForms app in VB.NET (Framework 4.7.2) that optimizes an electronic signature using ImageSharp, and I am running into a problem. When I try to use the OctreeQuantizer to decrease the number of colors in the PNG, I get an…
WJBode
  • 1
  • 3
0
votes
1 answer

ImageSharp RecolorBrush not available anymore?

I'm using ImageSharp version 2.1.3 in a .NET 6 project. Now the API which I can use seems to be different from what is shown in the official documentation. For instance the docs are pointing to a namespace SixLabors.ImageSharp.Drawing which is not…
Alexander Schmidt
  • 5,631
  • 4
  • 39
  • 79
0
votes
1 answer

Object disposed exception after passing Image as paramter

I'm trying get Image(ImageSharp) from method, then pass it as parameter to another method and sent it by email, but I'm getting Object Disposed Exception. Here is how my code looks like: public async Task Handle( CancellationToken…
Gohini
  • 69
  • 5
0
votes
0 answers

Converting signature pad signature from json to image in server

.NET 6 MVC application uses Signature Pad from https://github.com/szimek/signature_pad to create signatures. Signature json strings from it are stored in PostgreSql database as strings…
Andrus
  • 26,339
  • 60
  • 204
  • 378
0
votes
0 answers

Raw Png images in PdfSharpCore library

I have a byte array of png image and I need to place it on pdf. For pdf creation I use PdfSharpCore. This library has three methods for creation a XImage (FromFile, FromStream, FromImageSource). First two methods use ImageSharp library to decode an…
yevhenip
  • 31
  • 4
0
votes
2 answers

Image not viewable using C# libraries viewable in ImageJ or ImageJ online have tried ImageMagick and ImageSharp and System.Drawing

I have a file that I can view in ImageJ but most software just shows it in black. I am trying to view it in C# but it just comes up black, it is also not viewable in paint but I can view it in INcarta and ImageJ. The file is a 16 bit tiff that seems…
jdmneon
  • 444
  • 7
  • 12
0
votes
1 answer

Fill area outside the rotated image using ImageSharp

I am trying to draw two images on the other and when I rotate one of them, a black area appears around it using Image punchImage = await Image.LoadAsync(Path.Combine(imgPath, img)); using Image authorPfpImage =…
fralorange
  • 31
  • 3
0
votes
1 answer

File comes up black in ImageMagick but shows fine in ImageJ does anyone know why? It is 16 bit grayscale

enter image description here When I attempt to open this image in GIMP it also comes up as black, same as in ImageSharp, just confused about how to show this tif, ImageSharp doesn't even recognize it as 16 bit grayscale so i'm trying to find a way…
jdmneon
  • 444
  • 7
  • 12
0
votes
1 answer

How to position padded image?

I can create an image of an arbitrary size using this code: using var image = original.Clone(context => context.Pad(width, height, Color.White) ); However, this places the original image in the center of the new image. Is there a way to…
zimdanen
  • 5,508
  • 7
  • 44
  • 89
0
votes
1 answer

How to flip an image vertically using ImageSharp/C#

Because Y-axis is inverted I would like to flip my resulting image vertically. Currently this is how my code looks like: using (MemoryStream outStream = new MemoryStream()) { using (Image img = new Image(width, height)) { …
Walle
  • 19
  • 3
0
votes
0 answers

Draw circle with an EllipsePolygon in ImageSharp

I've just started using ImageSharp to draw images. The documentation on Six Labors web page is clean, but there is no examples to find anywhere about ImageSharp. So I struggle from time to time, all by myself :) I want to draw a circle with…
Walle
  • 19
  • 3
0
votes
2 answers

Save an Image with a new file name [ImageSharp]

I have upgraded my project from .net framework to .net 6 (core). In my project, there are many places where Bitmap is used. I have read in the microsoft documentations that System.Drawing.Common will only support the Windows platform and even after…
Sana Ahmed
  • 462
  • 3
  • 25
0
votes
1 answer

Replacing System.Drawing with ImageSharp for Barcode .net core 6

As we have upgraded to net core 6 we are rewriting some of our code base. We have a tag helper in AspNet Core which generates a barcode. This currently uses System.Drawing and ZXing. TagHelper Old version using System.Drawing - working (top…
AliK
  • 962
  • 2
  • 10
  • 31