Thread: image processing

  1. #1
    Registered User
    Join Date
    Dec 2017
    Posts
    6

    Post image processing

    so I have some images(BMP format) where there are some numbers. I want to change the numbers' colour. the problem is that I can't understand how this thing works. I've searched on the internet and found a function GetPixel (int x, int y) that is supposed to help me change the pixel's colour, but I don't understand how it works because when I try to use it..it isn ' recognized. can someone please help me understand how can I change a pixel's colour?

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,739
    GetPixel() is a function for Windows only. Do you have Windows? Have you created a window for your program? Have you taken the hDC (Device Context handler) of that window correctly?
    Devoted my life to programming...

  3. #3
    Registered User
    Join Date
    Dec 2017
    Posts
    1,565
    It's pretty easy to process the bmp file directly if you want.
    Ordinary language is totally unsuited for expressing what physics really asserts.
    Only mathematics can say as little as the physicist means to say. - Bertrand Russell

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    I second john.c's suggestion. You might consider reading up on the BMP file format and creating your own small library to manipulate the images however you'd like.

  5. #5
    Registered User
    Join Date
    Jun 2017
    Posts
    157
    found a function GetPixel (int x, int y) that is supposed to help me change the pixel's colour, but I don't understand how it works because when I try to use it..it isn ' recognized
    To use GetPixel you need to have a handle to a device context. Before you can create one you need a handle to a bitmap. Finally you nee to find a way the save the modified bitmap. I would say it's too complicated if you have never used the Windows API.
    Do you have to do it in C ?
    In C++ you could use CImg library. The CImg Library - C++ Template Image Processing Toolkit

  6. #6
    Registered User
    Join Date
    Dec 2017
    Posts
    6
    yes, i have to do it in C and not using Windows API, but Linux

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Image Processing
    By abachler in forum General AI Programming
    Replies: 2
    Last Post: 09-22-2009, 08:25 AM
  2. C# Image Processing :
    By wanchanok in forum C# Programming
    Replies: 2
    Last Post: 08-19-2009, 05:12 AM
  3. Image processing (was Need help (new to C))
    By Scarecrowm in forum C Programming
    Replies: 2
    Last Post: 10-19-2007, 12:35 AM
  4. image processing
    By ICool in forum C Programming
    Replies: 75
    Last Post: 10-15-2007, 04:42 AM
  5. Image rotation using intel image processing
    By sunis in forum Windows Programming
    Replies: 1
    Last Post: 11-18-2002, 02:40 AM

Tags for this Thread