Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
111 views

Extract black and white raw image in PDF to jpg and tiff

I have a task to extract black and white (1 bpc) image from PDF to jpg and tiff using .Net. But I got an exception when creating a bitmap from the memory steam. The below is parts of my code ...
Roy's user avatar
  • 1
1 vote
1 answer
928 views

Using Accord.Imaging in UWP

(apologies for beginner question) I am trying to use Accord.Net Imaging function in an UWP windows 10 App. Any function I try gives me an error: The type 'Bitmap' is defined in an assembly that is ...
Pierresa's user avatar
1 vote
1 answer
261 views

Determine whether a source resolution belongs to the specified aspect ratio

I would like to determine whether a source resolution belongs to the specified aspect ratio, in C# or VB.NET. Currently I wrote this: /// -------------------------------------------------------------...
ElektroStudios's user avatar
1 vote
1 answer
1k views

Speed Up Image Sharpening and Related Image Optimizations in .Net

My goal is to allow the user to improve image quality by providing the options to improve the sharpness,Contrast etc of a Bitmap I have followed the approach mentioned in https://www.codeproject.com/...
techno's user avatar
  • 6,470
3 votes
3 answers
671 views

Precisely scale image

I am trying to precisely and predictably scale an image in C# to a different resolution, both up and down. When I open the resulting images with external tools such as Gimp, the results are not ...
just.me's user avatar
  • 2,265
0 votes
2 answers
3k views

.NET, convert png file into RGBA 32bit Bitmap, in memory

var image = Image.FromFile(@"C:\image.png"); How do I convert this into a Bitmap in rgba32b format?
Paul Knopf's user avatar
  • 9,766
1 vote
2 answers
1k views

Free imaging library (autocontrast, deskew, binarization...) [closed]

I've found paid components like LeadTools, but the project I'm working is open source, I would like to use free tools. I need to apply several image correction filters to an image to apply some ...
SuperJMN's user avatar
  • 13.9k
1 vote
1 answer
579 views

vb.net Screen Capture of form2 with form1

i have a problem here. I have a form1 which i use to get settings en so on. But there is also a panel that i want to use to see whats inside form2. Form2 = a fullscreen form without formborderstyles ...
Thomas Dutoit's user avatar
0 votes
2 answers
1k views

Byte array image crop performance issue

Have two pointers (byte*) to 1. B8G8R8A8 pixel data 2. byte buffer to put cropped pixel data, very simple issue. Here is my implementation: private unsafe void Crop(byte* src, byte* dst, Rectangle ...
Kirill Karahainko's user avatar
5 votes
1 answer
3k views

Create a Bigtiff (>4GB) File with Bitmiracle Libtiff.net

First I want to thank Bitmiracle for this great lib. Even while creating very big files, the memory footprint is very low. A few days ago I ran into a problem where I wanted to create a tiff file ...
Andreas's user avatar
  • 4,013
0 votes
2 answers
629 views

How do I use pre-allocated memory when loading a Image in .net

I am wondering if it is possible to load an Image-File directly to the preallocated memory WITHOUT a new allocation for the bitmapimage itself. I wrote a sample class to demonstrate what I want to do....
Andreas's user avatar
  • 4,013
-1 votes
1 answer
279 views

How to do simple ball tracking? [closed]

I'm working in this project under .Net (yes I know, I should be using something different). The idea is to be able to track a ball moving down a table, the lighting situation is usually the same and ...
Ale K.'s user avatar
  • 316
1 vote
2 answers
714 views

Having issue converting 32 bit images to bitonal black and white

I have the following code routine... Public Shared Sub ConvertToBitonal(ByRef Source As System.Windows.Media.Imaging.WriteableBitmap) If Source.Format = System.Windows.Media.PixelFormats....
user2719109's user avatar
0 votes
1 answer
873 views

Memory Leak when Updating WPF Canvas Background

I'm sure the solution to this is simple but I'm left scratching my head so maybe someone can shed some light here. What I am doing is when my program starts I load an input file into a private ...
user2719109's user avatar
1 vote
1 answer
2k views

Getting BitmapImage PixelHeight Property causes Initialization Issues

I have a BitmapImage that I want to get the PixelHeight and PixelWidth properties so I can determine whether it has a landscape or portrait layout. After I determine its layout, I need to set either ...
kformeck's user avatar
  • 1,813
5 votes
3 answers
7k views

Is there a way to resize an image using GPU?

Is there a way to resize an image using GPU (graphic card) that is consumable through a .NET application? I am looking for an extremely performant way to resize images and have heard that the GPU ...
John Egbert's user avatar
  • 5,756
1 vote
1 answer
157 views

Need to utilize OpenNETCF v2.x Imaging in application that has assemblies built on OpenNETCF v1.4

I have an existing WM application that I need to capture photos with and it looks like the Imaging class in OpenNETCF v2.x is the best bet because I am running into the "Out of memory" exception when ...
Ryan Allan's user avatar
2 votes
3 answers
5k views

Write text to image with indexed pixel format

I have monochrome TIFF files (1 bpp) that I would like to write text to. When I load them into System.Drawing.Image, and try to instantiate a Graphics object from that image, I receive the error, "A ...
DCNYAM's user avatar
  • 12.1k
15 votes
4 answers
22k views

How do you convert a byte array to a Bitmap instance (.NET)?

I am working with cameras (in this case monochrome) in VB.NET. The API of the cameras is in C++ and the manufacturer provides wrappers. As is typical in these cases, the image is returned as a Byte ...
darda's user avatar
  • 4,105
8 votes
2 answers
5k views

Determine image overall lightness

I need to overlay some texts on an image; this text should be lighter or darker based on the overall image lightness. How to compute the overall (perceived) lightness of an image? Found something ...
ʞᴉɯ's user avatar
  • 5,574
3 votes
3 answers
30k views

Image.FromStream: Parameter not valid

I am trying to create an image from a byte array. The byte array is created by a fingerprint scanner (cf CaptureFrame method). fwidth is 256 and fheight is 255. When I run the code below, I get ...
blueshift's user avatar
  • 881
3 votes
1 answer
3k views

How to add text to images with the CMYK ColorSpace in .NET 4

I am working on a project that at it's core involves adding text to an image, so as an example given a background image (B) and some text in a specified font, point size and font (A) the two are ...
Richard Slater's user avatar
0 votes
2 answers
956 views

Native .NET PNG image file encoder

Does such an encoder exist? The GDI+ one is not very fully featured. For example, it will always render out 32bpp images, even if you're using 8bpp indexed in-memory. I'm about to start writing out ...
Drew Noakes's user avatar
1 vote
1 answer
327 views

.NET Image problems on ListView in WinForms App (displaying incorrectly)

I am experiencing very weird issues surrounding Images. I have a settings window, which has a ListView on the left hand side which has various image icons which when clicked update the panel to the ...
Marlon's user avatar
  • 2,139
1 vote
0 answers
165 views

open multi image pages to different Bitmap objects in .net

I am developing an image editor and the structure needs a different Bitmap object for each page. But in .net i couldnt find a fine way. When i use Bitmap.Clone() it gives the same bitmap (not only ...
Ali YILDIRIM's user avatar
10 votes
4 answers
3k views

OCR engines designed for screen-reading

Are there any OCR engines designed for identifying text in screen-captured images rather than scanned text? I have a project where I need to retrieve and identify text in an application, and none of ...
Erik Forbes's user avatar
  • 35.8k
2 votes
2 answers
436 views

.NET photo processing component

I'm looking for a .NET image processing component or an open source alternative to automate the following tasks: Photo capture (webcams and photo cameras) Photo printing (grid/strip modes) Applying ...
SharpAffair's user avatar
  • 5,468
1 vote
2 answers
433 views

How to determine the transparency color of a bitmap

I know you can programmatically determine the tranparency color of a .gif Is there a way to do the same for a Bitmap? Right now, I am doing this heuristically by sampling around the outer edge but ...
Sky Sanders's user avatar
  • 37.1k
4 votes
3 answers
3k views

Converting a GUID to System.Drawing.Imaging.ImageFormat

I store information about images in a database - also their ImageFormat (jpeg, png etc). Console.WriteLine(System.Drawing.Imaging.ImageFormat.Jpeg.Guid); Outputs: b96b3cae-0728-11d3-9d7b-...
Kjensen's user avatar
  • 12.4k
7 votes
3 answers
5k views

How to implement pan/zoom on gigapixel bitmaps?

In my project, I'm using (uncompressed 16-bit grayscale) gigapixel images which come from a high resolution scanner for measurement purposes. Since these bitmaps can not be loaded in memory (mainly ...
Adriaan's user avatar
  • 3,312
6 votes
3 answers
7k views

Printing a WPF BitmapImage

What's the best way to print a BitmapImage? I come from a background in System.Drawing so I was thinking about converting it to a Bitmap and then printing it, but I'm thinking there's probably a ...
James Jones's user avatar
  • 8,703
1 vote
3 answers
1k views

Image Property Tag Constant

I'd like to use the image property tag constants defined in GDI+ from .NET. I wonder whether these constant values (e.g. PropertyTagGpsVer constant) are exposed in any of the Base Class Library? I ...
Adrian Godong's user avatar
1 vote
2 answers
7k views

Combine two images with one being transparent

I have two bitmap images. One contains a picture taken with a usb camera. The other will contain a shape, like a rectagle, but it can also be a trapezoid, or lets say, a random shape with only one ...
Eric's user avatar
  • 19.9k
1 vote
1 answer
2k views

Image Resize C#,VB.NET Opensource Library

Any one point me on good direction on how to resize a jpg image to exactly particular size (Both File size and pixel size Ex. 148 x 72 px , 300 KB ). To Acheive this, Quality of images can be ...
user avatar
5 votes
2 answers
7k views

Effective way of making negative of image without external dlls

That is the solution to make a negative from a image in C# Windows Forms without any dlls and in a effective, fast way?
Tom Smykowski's user avatar