Thread: Writting watermark to image.

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    132

    Writting watermark to image.

    Hello,

    I am trying to figure out how to write a watermark text on an image I load. Would a simple textout do the job? I don't have experience in manipulating pixel data, so can somebody help me?

    Thanks a lot

  2. #2
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    eh, using the plain old adding text to an image isnt going to do it for copyright, what you are looking for is steganography, where you actually plant data INTO the image , such as a copyright notice, instructions for a nuclear bomb,etc.

  3. #3
    unleashed alphaoide's Avatar
    Join Date
    Sep 2003
    Posts
    696
    Adobe Photoshop (if you have it 'cause it costs a fortune) has the feature to add watermark.
    source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense

  4. #4
    Registered User
    Join Date
    Jun 2002
    Posts
    132
    I don't care about adobe, I need to make a program so that it can take all pictures in a directory and add a specific watermark on 0,0 at the image, a string.
    Y3K Network http://www.y3knetwork.com
    Bringing the software of the future on the net.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    What sort of answer are you looking for?

    Hard to imagine how you can write a program which doesn't involve pixel manipulation, but which does add a watermark to an image.

    Unless you're hoping for some magical API call which does it all for you

    Code:
    void watermark( const char *filename, int x, int y, const char *text );
    int main ( int argc, char *argv[] ) {
      watermark( argv[1], 0, 0, argv[2] );
    }
    Try GIMP (or free adobe). It has scripting facilities, so once you finally figure out what it is you want to do, then automating it would not be too difficult.

    In fact, how about this
    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.

  6. #6
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    You'll need an image manipulation library. Depending on your OS/Compiler and the format of the images you may already have one capable of your needs. Otherwise, you can grab one from the web.

    http://www.imagemagick.org/index.html?

    http://www.boutell.com/gd/

    http://www.radix.net/~cknudsen/Ilib/

    http://www.google.com/search?q=image+library+c

    http://directory.google.com/Top/Comp...ics/Libraries/

    http://www.google.com/search?q=image...+site%3Asf.net

    GDI+ (MSVC only)

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. Replies: 1
    Last Post: 05-27-2009, 12:46 PM
  3. Simple Image Processing
    By ejohns85 in forum C++ Programming
    Replies: 4
    Last Post: 03-19-2009, 12:10 PM
  4. Image rotation - doesn't always work
    By ulillillia in forum C Programming
    Replies: 12
    Last Post: 05-03-2007, 12:46 PM
  5. Replies: 4
    Last Post: 03-02-2003, 09:12 AM