Questions tagged [system.drawing.imaging]
80 questions
0
votes
1 answer
Using System.Drawing.Image to Export-Csv with $imageFile.Width and $_.Fullname
I wonder if there is a betterr way to write this script to gather image dimensions and filepaths. The script works great on small to medium size directories, but I'm not positive that 100,000+ files/folders is possible.
Measure-Command…

fcool
- 1
- 1
- 2
0
votes
1 answer
.NET 6: Transitioning from System.Drawing to SkiaSharp for Tiff to PDF conversion
I am trying several ways to remove System.Drawing due to the pending removal of the workaround in .NET 7. I am trying to use SkiaSharp to replace those calls but am having trouble.
The following is what I currently have, which processes Tiff data…

usagibear
- 303
- 3
- 12
0
votes
1 answer
Bitmap.Save erroring with Null Exception and yet it is clearly instantiated
Before an upgrade to Unity and Visual Studio I had a simple block of code that ran without errors, after the updates however the exact same logic raises a NullReferenceException.
The exception is raised when calling BitMap.Save() but I have verified…

CodeMonkey
- 1,795
- 3
- 16
- 46
0
votes
0 answers
Writing a watermark over an existing image using C# System.Drawing
Basically, I want to add information such as the date and time on a snapshot image of surveillance footage. I don't know to position text in the far top right/left-hand corner. Please any ideas on how I can do this? The programming language that I…

M.Mike
- 11
0
votes
0 answers
Cannot save array of png images: "generic error in GDI+"
My project is in Electronjs. And i have to get icons of files according to extension. My c# script working well till packaging it into exe. It throws an error after packaging.
Here the error:
Error: Command failed: C:\my-…

Syrym
- 1
- 1
0
votes
1 answer
Prevent Image Size from Increasing While Dimensions Are Decreased
I have a function that takes in a byte array of image data and then resizes it so its height and or width are around 200px max.
The function successfully reduces the size of the image (in terms of dimensions), but the size of the file gets…

Isaac Byrne
- 603
- 1
- 7
- 19
0
votes
0 answers
What does `Encoder.SaveFlag` do?
Encoder.SaveFlag is one of the EncoderParameter variants which can be used when saving a bitmap to a file, stream, etc.
This parameter IS documented but the documentation says essentially nothing about what it is for, despite even using it in an…

StayOnTarget
- 11,743
- 10
- 52
- 81
0
votes
1 answer
System.Drawing.Imaging-like interface for Cocoa/iPhone image manipulation
I'm looking for an image manipulation library for the iPhone/iPad, with similar functionality like System.Drawing.Imaging on the .net side.
Things I want to do:
draw basic shapes, like elipses, rectangles, text
draw it to a certain place on the…

friedkiwi
- 2,158
- 8
- 29
- 52
0
votes
1 answer
Center crop image while using C# System.Drawing to generate thumbnail
I have a scenario where I am generating a thumbnail using System.Drawing by resizing the original image to a provided size (size being used ). If the source image is a rectangle, the resulting thumbnail needs to be square without ruining the image…

Musab M. Jafri
- 246
- 1
- 4
- 13
0
votes
2 answers
Get RTF Image Html base64 string as System.Drawing.Image
I am storing a Rich Text html string in our database, examples as follows (I have shortened the bit info):
data:image/png;base64,iVBORw0...ORK5CYII
data:image/jpeg;base64,/9j/4AAQS...TcUQrQf/Z
I need to basically take this HTML and create a…

CJH
- 1,266
- 2
- 27
- 61
0
votes
1 answer
BitmapMetadata.SetQuery does not work on Tiff images
I'm trying to add Exif data to images using System.Windows.Media.Imaging. Most of the sample codes I can find work for JPGs but not Tiffs. Apparently, the codes could not expand the header to add new Exif fields. Any ideas what are missing in…

Chu Bun
- 513
- 1
- 5
- 17
0
votes
0 answers
Creating a background gif on a Windows Form as an Easter Egg
I am trying to hide something in the .designer.cs page of a windows form.
I want it to run off the ui thread, and update the background of the form to show a gif (totally PG).
This is all I have been able to come up with so far, but something must…

Asymptote
- 13
- 6
0
votes
2 answers
System.Drawing.Image not working in Web Form C# 2010
I have a Desktop Barcode Application in C# as given below
Now I want to convert the desktop app to a Web App in C# 2010 ASP.NET.
Interface is as given below
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Barcode.aspx.cs" …
user2957523
0
votes
0 answers
An unhandled exception of type 'System.ArgumentException' occurred in System.Drawing.dll Additional information: Parameter is not valid
i have to display binary image in pictureBox (Winforms Application) but having the exception "Parameter is not valid". below is my code, i searched alot but could not found the desired solution.
ClsCustomerTransaction ct = new…

Loyal
- 773
- 2
- 8
- 20
0
votes
1 answer
How do I modify/add metadata to System.Drawing.Image file
Business purpose: I'm creating a CMS, and allowing the user to "delete" images that they've previously uploaded to the server.
Issue: if I allow them to really delete the images, they are left with old posts they've created with now-broken images. …

Ian Davis
- 19,091
- 30
- 85
- 133