I have just started programming in C++ and I want to make a DLL to Blur a image. I am not asking for code I want to LEARN to do it please post any tutorials or help on making a DLL and Manipulating Images.
Thanks for reading!
I have just started programming in C++ and I want to make a DLL to Blur a image. I am not asking for code I want to LEARN to do it please post any tutorials or help on making a DLL and Manipulating Images.
Thanks for reading!
How about you regard them as completely separate tasks for the moment.
Like lets begin with which compiler you're using. Does it have the capability of creating DLL projects, and does it also have a "wizard" mode to create blank or "hello world" type DLL projects?
As for image manipulation, there's tomes of stuff on "da web".
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I learned how to create dll`s thought http://en.wikipedia.org/wiki/Dynamic_link_library and http://www.codeproject.com/dll/Dllfun.asp.
Yes it has a wizard mode. I am using DevC++.
You might take a look at the open source Free Image project. (Although, most open source projects contain lots of code and it can get overwhelming trying to learn from them.)
A quick search of Free Image for "blur" didn't get any hits (you said you didn't want to copy anyway) but it does have functions to open images in various formats and to rotate them etc. So, that should get you started.
And, Free Image can be compiled as a DLL or used as a static library, so that may help too.
I'd recommend that you start by manipulating simple (small) bitmaps. (A bitmap is just an array of pixels.) In general, you have to decode an image to a "bitmap" before you can manipulate it.
'Blur an image' is a very broad statement. There are several methods for blurring.
You could try implementing a simple 'convolution filter' - google that.
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"
Use the CImg Library. Free, all in one header file (.h), and very easy to use. Find it here.
To use:You can also sperate it, but I prefer this method. The .blur() can contain a number (I don't know what range) that defines how much to blur. I used this code on the examples attached. The first is before, the second is after.Code:#include "CImg.h" // The include file using namespace cimg_library; // The namespace - both the include and namespace are required CImg<>("test.jpg")/*Open the image*/.blur(10)/*blur it by 10*/.save("test1.jpg")/*and now save it with a new name*/;
Last edited by mikeman118; 09-26-2007 at 02:48 PM.
Thanks guys I think I am going to learn a little more c++ and then try to write my own. If that doesn't work the function mikeman showed looks good.