I have large JPG images ( say 20000x10000 pixels) and want to extract sub-images from these images without loading whole image.
I found it's possible by using this ImageMagick command:
convert -extract 226x248+4216+3377 a.jpg o.jpg
But I need to have it in my C# WPF app.
Magick.NET did not implement extract methods.
Is there any .NET library for this? Or at least a simple exe that can be copied without installing big libs like ImageMagick on client machines.
Magick.NET does support extraction of a subimage. You should use the Crop method:
The -extract option of ImageMagick will read the whole jpg before cropping out the part you need. So maybe this is not a solution for your problem. Only for a small set of formats the image will not be read completely.
I don't know of any c# libraries that can do this. Gdal at http://www.gdal.org can do it, though. It also has c# wrappers, might be a bit bulky just for this purpose, though.