How to get the boundary value from bitmap file

How to get the boundary values of images in a bitmap file. What is the API or library function to extract the images and the boundary values

thnaks in advance

Look into PixMap and XReadBitmapFile and XCreatePixmapFromBitmapData in XLib.

hi shinpaughp
for finding boudary i used some other way. just look at my source code file and sample image file also in my home page.

for some part not finding correct boundary value…

help in coding part…(mouse click)

this is the URL
http://www.geocities.com/kkmlinux/Project.html

thank you one’s again

karthickumar

You could be a little more specific…

I’ve had a look at your code, and it looks like you load up a bitmap, then have the user click the mouse on some point and then you read some stuff from the bitmap.

  1. your code only handles 24-bit bitmaps. Which isn’t an error, but something to take into consideration.
  2. in your mouseclick function, you are reversing the y-position by subtracting it from the height. That is almost correct, but remember that the height = 1+maxY , i.e. if you get a curY of 25, and the height = 100, you should be addressing row 99-25=74, not 100-25.
  3. 24 bit BMP has the nasty habit of storing BGR instead of RGB, so the red value is BitmapBits[c+2], not BitmapBits[c]

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.