none
How do I get pictures of DPI? RRS feed

  • Question

  • I want to get DPI from the selected msoPicture in PowerPoint.

    foreach(Shape shape in slide.Shapes)
    {
      if(shape.Type == MsoShapeType.msoPicture)
      {
      }
    }
    What should I do next?
    Wednesday, August 9, 2017 11:00 AM

Answers

  • I use ImageMagick (free) for all my image manipulation needs.  It is a command line program.  It has a .com interface so you can call it from VBA although I usually use VBA and call the command line directly.  Here is the command to get pixels and dpi. 

    magick identify -format "%w x %h %x x %y" "C:\userdata\bell\pics\test.JPG"

    Output:

    3648 x 2736 180 x 180

    • Marked as answer by 李冲-LC Friday, August 11, 2017 8:43 AM
    Thursday, August 10, 2017 1:40 PM

All replies

  • Do you mean DPI or pixels?  DPI is just a number in a jpg image.  It tells the printer how to print image.  Pixels tells the size of the image.
    Wednesday, August 9, 2017 2:18 PM
  • I know what they mean, so how do I get DPI?
    Thursday, August 10, 2017 1:13 AM
  • I use ImageMagick (free) for all my image manipulation needs.  It is a command line program.  It has a .com interface so you can call it from VBA although I usually use VBA and call the command line directly.  Here is the command to get pixels and dpi. 

    magick identify -format "%w x %h %x x %y" "C:\userdata\bell\pics\test.JPG"

    Output:

    3648 x 2736 180 x 180

    • Marked as answer by 李冲-LC Friday, August 11, 2017 8:43 AM
    Thursday, August 10, 2017 1:40 PM
  • Thanks.
    Friday, August 11, 2017 1:14 AM