user3696412
user3696412

Reputation: 1419

C# Read huge image into array

I have huge images (1.800MP @ 8bit or 16bit), all grayscale, no alpha, transparency or other stuff.

They may come as png, tiff, bmp, or even jpeg, so I need an image library to handle the reading, decompression and stuff.

After this, I just want to get an array with the grayscale pixel values out - preferrably 2d, but 1d is also alright. It also may be ushort all the time, even for the 8bit images.

I tried using the buid-int BitmapImage of C# - no luck, just throws exceptions for images this large.

Any other libraries that can give me the grayscale values, without hassle?

Upvotes: 1

Views: 144

Answers (1)

Tech Solver
Tech Solver

Reputation: 523

It will be faster if you use simple FileReader to read the content and generate your own array rather then looking for a library.

Upvotes: 1

Related Questions