views:

383

answers:

4

Hello all how can i do simple thing like manipulate image programmatically ? ( with c++ i guess .. ) jpgs/png/gif .....

+5  A: 

check out BOOST , it has a simple Image Processing Library called GIL. It also has extensions to import common formats.

http://www.boost.org/doc/libs/1_39_0/libs/gil/doc/index.html

+2  A: 

Using .NET you have two options:

  1. GDI+ from System.Drawing namespace (Bitmap class)
  2. WPF engine wich can do a lot of things

If you want low level processing you can use unsafe code and pointers.

A Bitmap or Image is just a big array of bytes. You need to learn:

  • what is a stride (extra padding bytes after each row of pixels)
  • how to compute the next row or a specific pixel location using width, height, stride
  • the image formats RGB, ARGB, white&black
  • basic image processing functions (luminosity, midtone, contrast, color detection, edge detection, matrix convulsion)
  • 3D vectorial representation of a RGB color
pixel3cs
With .Net have much more than two options......But the question is far too general to provide an answer.
Adrian
+2  A: 

Depending on how fancy you want to get, you may want to look at OpenCV. It's a computer vision library that has functions ranging from reading and writing images to image processing to advanced things like object detection.

Mr Fooz
+1  A: 

Magick++ is a C++ API for the excellent ImageMagick library.

An advantage of ImageMagick is that it can be used from the command-line and a bunch of popular scripting and compiled languages too, and some of those might be more accessible to you than C++.

Will