C++ Image Manipulating DLL

This is a discussion on C++ Image Manipulating DLL within the C++ Programming forums, part of the General Programming Boards category; I have just started programming in C++ and I want to make a DLL to Blur a image. I am ...

  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    9

    Question C++ Image Manipulating DLL

    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!

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,420
    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 support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Jul 2007
    Posts
    88

  4. #4
    Registered User
    Join Date
    Sep 2007
    Posts
    9
    Yes it has a wizard mode. I am using DevC++.

  5. #5
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    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.

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    'Blur an image' is a very broad statement. There are several methods for blurring.

  7. #7
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,288
    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"

  8. #8
    Registered User mikeman118's Avatar
    Join Date
    Aug 2007
    Posts
    183
    Use the CImg Library. Free, all in one header file (.h), and very easy to use. Find it here.
    To use:
    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*/;
    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.
    Attached Images Attached Images   
    Last edited by mikeman118; 09-26-2007 at 02:48 PM.

  9. #9
    Registered User
    Join Date
    Sep 2007
    Posts
    9
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem reading tiff image files?
    By compz in forum C++ Programming
    Replies: 9
    Last Post: 10-30-2009, 04:17 AM
  2. DLL resources with, image files?
    By parad0x13 in forum C++ Programming
    Replies: 0
    Last Post: 03-15-2009, 07:27 PM
  3. dll communicating between each other
    By cloudy in forum C++ Programming
    Replies: 5
    Last Post: 06-17-2005, 02:20 AM
  4. DLL and std::string woes!
    By Magos in forum C++ Programming
    Replies: 7
    Last Post: 09-08-2004, 12:34 PM
  5. help with image dll interfacing vb
    By brenton in forum Windows Programming
    Replies: 7
    Last Post: 10-26-2003, 05:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21