Thread: How to convert inches into pixels?

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    77

    How to convert inches into pixels?

    I am just working on a pic, but I don't know how to convert inches into pixels. I have a certain size for the pic that is in inches. And I am using adobe imageready and it only has the pixels option.

    THanks

  2. #2
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    77
    Thanks Rod,

    I know, I searched the google but for some reason couldn't find it.

    Thanks again

  4. #4
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Not a problem, i searched for

    "convert pixels to inches"

    Whenever you need a conversion, start your search string with convert it works very well.

  5. #5
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    p = DPI * i

    p = number of pixels
    i = number of inches
    DPI = dots per inch.

    Perhaps this isn't what you're looking for. I'm not sure I understood.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  6. #6
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Well, the difficult part is finding the DPI. It differs from device to device. And sometimes there's just no way to get accurate information. Which is why applications like the Gimp need to be calibrated.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  7. #7
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    From your own programs on Windows, you can use SetMapMode() to change the mapping between logical units and display units. By default, the map mode is 1 to 1, i.e. one logical unit is equal to one pixel, but yu can change the scaling to work in millimeters or inches, (well, fractions of).
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  8. #8
    People Love Me
    Join Date
    Jan 2003
    Posts
    412
    ppi varies a lot....a pretty standard ppi is 72, I believe. So inches*72 could get you the amount of pixels, in theory...as long as you had a ppi of 72. But it can vary between images.

  9. #9
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    It varies between screens, not images really.
    Finding out yours is pretty simple. Measure the width of your screen, divide by your horizontal resolution.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  2. how to convert from dialog units to pixels?
    By Hussain Hani in forum Windows Programming
    Replies: 1
    Last Post: 01-17-2008, 10:07 PM
  3. How to convert screen coordinates
    By Bajanine in forum Windows Programming
    Replies: 3
    Last Post: 09-13-2003, 11:50 AM
  4. Convert Char to Int Function
    By drdroid in forum C++ Programming
    Replies: 9
    Last Post: 02-19-2003, 12:53 PM
  5. creating image from pixels stored in file
    By Kristian25 in forum Windows Programming
    Replies: 3
    Last Post: 01-21-2003, 02:08 PM