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
1 answer

Why are images in my ASP.NET Core application overwriting on my local environment but not when I upload to Azure?

In my ASP.NET Core 3.1 web application, I allow users to upload images that are stored in local directories within the application itself. Whilst, this could be better served using blob storage on Azure, this particular project has called for them…
Yanayaya
  • 2,044
  • 5
  • 30
  • 67
0
votes
1 answer

How to prevent ImageSharp Web from resizing to certain sizes?

I am using ImageSharp.Web to resize images on my ASP.NET Core 5.0 website. To prevent DDoS (Distributed Denial of Service attacks), I would like to restrict the sizes that ImageSharp.Web can resize too. For example I have an image with an original…
Sha
  • 2,185
  • 1
  • 36
  • 61
0
votes
1 answer

Can I use ImageSharp with .Net Core for a screen capture of the web browser

I have an Asp.Net Core 2.2 MVC web app. It is setup as multi-tennant and running on Azure. In order to improve support options I want to add the possibility for the user to create a screen capture of the browser window that is then attached to an…
RJD
  • 320
  • 3
  • 11
0
votes
1 answer

SixLabors ImageSharp produces huge image files

I use the below code to resize JPG files to 200x240 pixels. The attached example file has a size of 900x600 pixels and is only 84 kb. However when I save the resized file using ImageSharp, the produced image is 435 kb! Why is the smaller image has a…
Aref Karimi
  • 1,822
  • 4
  • 27
  • 46
0
votes
0 answers

I can't display the image on the discord channel using the bot

I want to output an image to the channel using the Imagesharp framework, or rather I'm new to This framework. Initially, I got this error "Can't convert from" SixLabors.ImageSharp.Image "to"string". I tried to solve the problem by writing string a =…
white cat
  • 3
  • 3
0
votes
1 answer

Adjust gamma of image using ImageSharp

I'm porting an existing application to .net core and I need to adjust the gamma of an image using ImageSharp. I've tried image.Mutate(i => i.Brightness(value)); but it's not quite the same result as the original code which changes the gamma. The…
cracanut
  • 3
  • 2
0
votes
1 answer

Image after resize has a discolored line on the left side

I'm trying to resize images into thumbnails in a .NET Core C# application using SixLabors.ImageSharp (version 1.0.0-beta0007). I've noticed that for only certain images, the resized image has a white, red, or blue distorted border, like so: My…
0
votes
1 answer

How do I save my resized image to my Azure Blob Storage in my ASP.NET Core Application?

I'm using the ImageSharp library to rescale my images before they are uploaded to Azure, the application hangs with no errors when it reaches the UploadBlob action and I think it's the stream causing it. When the image is uploaded the information…
Yanayaya
  • 2,044
  • 5
  • 30
  • 67
0
votes
1 answer

Imagesharp - prevent from resizing small images

Is it possible to prevent Imagesharp from resizing images if their dimensions are smaller than those specified in the query parameters?
Lynx
  • 15
  • 1
  • 4
0
votes
2 answers

How to calculate the vertices of an affine rectangle

I am trying to draw a affine rectangle (with rotation and skew) on top of an image but don't know how to calculate the vertices. I don't have a background in maths or matrix operations. My affine class is defined as follows: public class…
canice
  • 363
  • 1
  • 4
  • 16
0
votes
1 answer

Simple image metadata reading using .Net Core

I have seen seen several posts regarding this but I could not apply any of them. It's perhaps due to documentation change. I used ImageSharp and System.Drawings. System.Drawings is not supported in .Net Core. Also ImageSharp sample that I found did…
jax
  • 840
  • 2
  • 17
  • 35
0
votes
1 answer

Image stored in SQL Server database after resize with Imagesharp not showing in html

I have a .NET Core 2.2 web app where I am storing user images in a SQL Server database. When I save the file as is, it displays in the web page with no problems. After that I wanted to resize the image when the user uploads the file and installed…
TechSha
  • 134
  • 2
  • 10
0
votes
1 answer

Placing a rotated image with ImageSharp

I'm trying to rotate (around it's center) and place an image on top of another image. After rotation, the XY coordinates i expected it to be in, is all wrong. An example on how to do this would be greatly appreciated Currently drawing debug frames…
zandzpider
  • 11
  • 4
0
votes
1 answer

imagesharp trying to make an animated gif that count from 0 to 9

anyone could tell me why this generate a black only animated gif? the code also output each in memory generated gif to show that they are different public static void Test() { Image img = null; Image gif =…
Fredou
  • 19,848
  • 10
  • 58
  • 113
0
votes
1 answer

Custom decoders for PNG files

I've donwloaded an image from user manual (see attachment) and need to transform it. When I tried to load it via following code, I got the exception: "Image cannot be loaded. Available decoders:\r\n - JPEG : JpegDecoder\r\n - PNG : PngDecoder\r\n -…
shaddow
  • 107
  • 1
  • 1
  • 12
1 2 3
10
11