Any way to check image type and get dimensions without System.Drawing?
Anyone know of any way to test the image type and get the width/height without using the System.Drawing namespace? I'm working on a small app that processes a lot of pictures at once and could get multiple users using it at the same time. When I use it without doing its image calculations, it only takes max 10% of the CPU. However, when I have it get the width/height (which I need for it to work properly) using a bitmap, it gets up to around 80% CPU usage. Big jump!
I'd found this java class that tests an image's type and gets the width/height by looking at its data raw, but alas, it is in Java, and converting it to .NET is too much of a pain (was trying it for a while... down to 29 errors that I know of). When screwing around with some of the raw data, I can find the width/height in the file, but the offset it sometimes different, since it seems to depend on the size of a header that is before it.
Somebody somewhere in .NET Land must of thought of doing something like this before?