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
2
votes
2 answers

Reliable image handling on Azure platform / Dotnet core

I'm struggling a little with images on the Azure platform under dotnet core and I'm hoping someone can make a sensible suggestion. Simple enough premise: user uploads image, saved in a database as base64 (about to move to Azure storage blob, but…
Michael C
  • 231
  • 1
  • 7
2
votes
1 answer

Loaded texture using ImageSharp displays white (opentk)

After loading the image with the help of ImageSharp and then loading it into vram it renders just a white quad. I basicly have no clue what i could have done wrong, this is the first time working with opentk crossplatform not beeing abel to use…
2gJava
  • 59
  • 6
2
votes
1 answer

How to create Gif .net Core2 , with ImageSharp

Is the any way to create a gif from some jpegs in .net core2 with ImageSharp? I could create a gif from some jpegs with Magick.Net, but it does'n t work on Linux. I wanna do this on Ubuntu 14. EDIT I could create a Gif from Jpegs with ImageSharp.…
Tak
  • 39
  • 4
1
vote
0 answers

Type or namespace could not be found - C# in Unity & VSCode

I am new to using C# assemblies. I am working on the C# script of an old project in Unity 2019.4.4f1 and I tried adding the SixLabors' ImageSharp assembly to the project but still get the Type or namespace 'SixLabors' could not be found (are you…
1
vote
1 answer

Draw text in an ArcLineSegment counter-clockwise with ImageSharp

cross-posting this from the ImageSharp.Drawing GitHub discussion since it's still unanswered after 3 weeks I'm trying to replicate this: With this code: public void Draw(string text) { var imageSize = 300; …
Wizche
  • 893
  • 13
  • 32
1
vote
1 answer

Copying an Image to the new instance in SixLabors.ImageSharp

The task is simple, however I can't figure it out. I have following function: /// /// Highlights areas on the image /// /// Initial image to highlight on ///
1
vote
0 answers

How to save a Jpeg with ImageSharp with parameters for better quality

I need to convert the following code based on System.Drawing to use ImageSharp. The method saves a JPG image. internal static void SaveToJpg(MemoryStream ms, string fileName) { using (var image = System.Drawing.Image.FromStream(ms)) { …
Simone
  • 71
  • 4
1
vote
0 answers

SixLabors Image Sharp How to Write text to Image c#

I have searched for a long time. I know it is part of the extended package, but I cannot seem to find any examples. Even a hello world example on how to write text to an Image Sharp image. Thanks for any help. public Image DragImage { …
zapdbf
  • 107
  • 6
1
vote
1 answer

Imagesharp resizes my image larger than the original

I have a program in .NETCoreApp 3.1 and I use the SixLabors.ImageSharp version 2.1.3 to handle the processing of images in our CDN for all our sites. The application run in docker container linux and for testing locally, I use WSL2 with ubuntu. We…
Julien
  • 11
  • 2
1
vote
1 answer

How can I get image content as pixel and create image from it in ASP.NET Core 6 Web API?

I try to save my images on my server, but I can't let my server save file and virus because of that I want to get image content as pixels of rgb and after that I create image by myself. I can't use bitmap (or other type in C# like bitmapImage, ...…
1
vote
1 answer

Imagesharp custom image provider, cache not working

I am trying to make a POC with .net 6 and imagesharp. I am trying to implement a custom imageprovider with cache in azure. The images are stored ind a SQL database. For now I just load an image from a static file. The images should be loaded from a…
Bjarke
  • 1,283
  • 11
  • 36
1
vote
0 answers

Difference between MeasureString in System.Drawing and TextMeasurer.Measure in SixLabors

I have two Methods to return width of string: The first method is using System.Drawing: public static float GetTextWidth(string fontFace, float fontSize, string text) { var fontx = new System.Drawing.Font(fontFace, fontSize); //Using a Bitmap…
Nb777
  • 1,658
  • 8
  • 27
1
vote
1 answer

Rendering justified text - I cannot get the words to align by baseline

I am using the ImageSharp library to render multiple lines of text, and I want each line to be justified. I want the spacing to be dynamically calculated to ensure the first character is left aligned and the final character is right aligned. I wrote…
Andrew Shepherd
  • 44,254
  • 30
  • 139
  • 205
1
vote
0 answers

How to using strings in blob triggers over isolated Azure Functions

I'm using an Azure Function v4 (isolated process) and I have a Blob Trigger Function that receives "string", instead a "Stream" because currently are not supported. How can I transform this string to a Stream. The string should be an image that I…
Sergio
  • 175
  • 5
  • 21
1
vote
1 answer

System.Drawing.Common.Bitmap cross platform alternatives

I am looking to convert PDF files into images. Docnet is able to convert the pdf into bytes[] and their samples show how to save this byte[] into an image file using Bitmap. Documentation However, the solution won't work on linux machine since…
Pankaj
  • 538
  • 4
  • 13