Extract small portion of image without loading all of it [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
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:
using(MagickImage image = new MagickImage("a.jpg"))
{
image.Crop(new MagickGeometry(226,248,4216,3377));
image.Write("o,jpg");
}
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.

Related

.Net free open-source components to generate PDF [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
The task is to generate 2-3 pages PDF file, which may contain tables, with borders and without, nested tables, and simple formatting (align, text size, bold/italic). Input may be anything from markdown, or html, but some strict format to create a template. Output - pdf. Everything should be server side.
I have already researched in many libraries. iText is not supporting tables, others are expensive or require Word/IE to generate a file...
Is there any free libraries, which support this for C#?
iTextSharp does support tables (PdfPTable).
Versions 4.1.6 and below are LGPL/MPL licence, and are free of charge
Versions 5+ are not free.
I used to use iTextSharp around version 4 and I'm sure all of your requirements are met. Try it out!
ABC Pdf works very well, but its around $250 :( they offer a free trial though.
Few other alternatives will be. iTextSharp is really good :)
iTextSharp
http://sourceforge.net/projects/itextsharp/
PDF Sharp.
http://sharppdf.sourceforge.net/
PDF Clown
http://www.stefanochizzolini.it/en/projects/clown/index.html

Twain or WIA? A bit lost between this two interface [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I need to write a c# assembly (DLL) in order to scan documents.
I don't know if I need to use TWAIN or WIA.
Anyone could help me please ?
What are the différences?
What are your advices ?
Is there a c# Library ?
Generally, if your application is to interact with scanners, TWAIN is recommended. While for cameras, WIA offers better support.
So for document scanning solution, I would recommend TWAIN.
TWAIN.H file is a C/C++ header file. If you want to code it to .NET yourself, you can refer to this post to get some resources:
Using TWAIN in .NET - Looking for resources
Or you can use a commercial .NET TWAIN component.

What open source C# library can read/write micro QR codes? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am looking for a C# library to generate and read micro QR codes (example below). It would be great if the llibrary could recognise a micro QR code in an image with other things in it (i.e. isolate and read the QR code.)
There is an open source project called QRCode.
QRCode library is a .NET component that can be used to encode and
decode QRCode.
Did not work very well for me.
Try google codes .net port http://zxingnet.codeplex.com/

Using .NET to detect .ogg file properties? Number of channels, bits per channel, sample rate? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Does anyone know how to detect various .ogg file properties such as the number of channels, bits per channel, and the sample rate?
I would like to do this without using DirectX, can anyone recommend a library that could do it. Can anyone recommend an open-source library that could do it, which could be called from managed code ?
I think NAudio can do this, but I'm not entirely sure. I know it can encode audio to ogg, but I'm not sure if it can read existing ogg files.
A StackOverflow user has posted a piece of code for working with ogg files: https://stackoverflow.com/a/8152967/14606
Figured it out and wrote about it:
http://ellismis.com/2012/01/06/using-c-net-to-detect-ogg-vorbis-file-properties/
Don't know of a library, but the file format looks pretty sane. You should be able to write some fairly trivial code to do this.
See http://en.wikipedia.org/wiki/Ogg#File_format

Is there an API to read ePub books? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm trying to create an ebook reader for WP7. So far I haven't been able to find any API to read ePub books with.
Thanks,
Zain
For DRM-free html based ePubs(there are also dtbook based ePubs, but I've never seen one) you can simply use a few libraries to build a reader:
An html render control, since the content is based on xhtml 1 and css
A zip library because the container is a zip archive
An xml library to parse the meta data files
For 2. and 3. there are many libraries, some of which support silverlight/WP7. No idea about 1, but I suspect WP7 already offers such a control.
EPUB sharp beta - http://sourceforge.net/projects/epubsharp/
Also, you can check out the draft of the ePub 3 spec here
Edit: Fixed the link
EPUB Sharp has not been updated since a long time.
Here's a step by step procedure in building your own (for iPhone, IMO it's good starting point).
I would imagine that extracting the contents of the book, as string or simple text and passing it into the Microsoft Speech SDK (SAPI) would work. Functions therein can be called from within c#. Did you try that already?

Categories