dpi

iTextSharp get PDF DPI

How can I get the DPI of the PDF that I am reading from my hard drive into iTextSharp? ...

How to make ImageButton in Android automatically scale based on screen density?

I have an image put on an ImageButton, which looks good on a mdpi (medium-dpi) screen. However, when the device has a hdpi (high-dpi) screen, the image is still pixel-by-pixel accurate, which look small on the device screen. How do I make such that the image (and therefore the ImageButton) scaled based on the density-independent pixels...

Checking if vector object will be visible on print with given dpi and print size

Hi, I have file (*.shp used in GIS) that contains collection of polygons and maybe other vector objects (but polygons are most important for me). I need to remove non printable objects it. I don't know what criteria chose. I think removing objects with small border length would be better then removing objects with small area (so long ...

How to Get DPI of Image in C#

hi how can i get dpi of an image using asp.net c# ...

120dpi screws up quick report printing

I have several reports in my application that are using quickreports. When I print them on a machine that has it's dpi setting at 96 they print correctly. If I change the dpi setting on the machine to 120 and print again the report layout expands off the page, all the elements start at the same position as the 96 dpi setting but the font...

high DPI problems...

Hi, I have a problem with the display of our .NET Windows application under high dpi settings. All forms are set to AutoScaleMode = DPI, but this does not solve all the problems. Basically labels end up expanding in size to cope woth the font being bigger, but the location of other controls does not change and we end up with lables ob...

c++ MFC CBitmap , CImage or BITMAP structure , get resolution (DPI)

HEllo , i can not find any way to get horizontal or/and vertical resolution for bitmap. If you know how to get it, please say it me , Thank you! ...

ActionScript Screen Measurements

i'm attempting to use the Capabilities class to draw an accurately sized sprite on screen at exactly (2.5" x 5") regardless of the screen's resolution, but while i believe the code is correct, the size of the sprite is not accurate - when actually measuring it with a ruler. function inchesToPixels(inches:Number):uint { return Ma...

DPI for EMF files

Do EMF files have a DPI that can be set? I have an application that allows saving an image in multiple formats (including EMF). I allow the user to specify the resolution/DPI for the image(s). However, I cannot find a way to do this for a MetaFile in C#. Is this possible or does EMF not have a DPI since it is a vector graphics format? ...

Imagemagik Change an images dpi from 400 to 72

I have an image on my server which I know the dpi of and if it's too high I want to size it down to 72 I still want to keep the same height and width of the image. Any ideas? I've played around with -resample -units and -density but don't seem to be getting anywhere and can't find any answers. Anyone out there that can help ...

GetWindowPlacement/SetWindowPlacement not working in WinForms for high DPI

I've got a legacy WinForms app and I want to save the window position and size across sessions. I've been using GetWindowPlacement and SetWindowPlacement during the FormClosing and Load events. The problem I'm getting is that at higher DPI settings (Such as Medium, size at 125%) the sizes keep inflating. I'll call SetWindowPlacement on i...

How to get screen DPI (linux,mac) programatically?

Hey, I need to know active screen DPI on Linux and Mac OS. I think on linux xlib might be useful, but I can't find a way how to get currect DPI. I want this information to get real screen size in inches. Thanks in advance! ...

GetSystemMetrics() returns wrong value for SM_CXSCREEN

I've run into an interesting problem. At least in Vista, getSystemMetrics(SM_CXSCREEN) returns an incorrect value when the desktop DPI settings aren't set at 100%. For example, I tried 150% in a 1366x768 screen and getSystemMetrics() returns 911 instead of 1366 (and 1366 / 1.5 ~ 911) According to the MSDN, getSystemMetrics(SM_CXSCREEN) ...

How to get Java swing application to respect OS DPI settings

Is there a way to set DPI in swing ? For the whole application ? And if there is how do I set it to the value of system DPI ? I guess there must be a way to do it as I mentioned this feature must have benn added to NetBeans in some of latest versions... Thank you for reading ...

HTML/CSS: What should I use to define image height/width to make it resolution independent?

I've read all over the Internet that I should not define fonts (or anything) with absolute pixel height/width/size and instead, use EM ... so that on higher resolution displays, my web site can scale appropriately. However, what do I use to define IMAGE height/width ... because images won't scale well (they look pixelated) UPDATE: To ...

How to calculate the correct image size in out pdf using itextsharp ?

I' am trying to add an image to a pdf using itextsharp, regardless of the image size it always appears to be mapped to a different greater size inside the pdf ? The image I add is 624x500 pixel (DPI:72): And here is a screen of the output pdf: And here is how I created the document: Document document = new Document(); ...

Programmatically set the DPI from a .net 2.0 WinForms application

I want to run my application on 96dpi, no matter what the dpi size from Windows is set to. It is possible ? ' Edit ' I found that using the Scale() method and resizing the font will almost do the trick. public class MyForm : Form { private static bool ScaleDetected = false; const float DPI = 80F; protected override void On...

Printing at specific DPI/resolution

I'm currently developing a printing application and I'd like to print at high quality/resolution and I couldn't figure out how. I iterated printDocument.PrinterSettings.PrinterResolutions and got this results: Kind - Resolution.X - Resolution.Y High - -4 - -1 Medium - -3 - -1 Low - -2 - -1 Draft - -1 - -1 Is it possible to print at...

Can pdflatex (or any tex package) automatically rescale included images which have been reduced in size?

I'm writing my thesis in LaTeX, generating it with pdflatex. I have a large number of figures, many of which are bitmaps (as opposed to SVG) in PNG/JPEG format. I've generally created them to be fairly high resolution (say 1600x1200-ish) to ensure that whatever size they end up in the document, they'll be at least 300dpi when printed. A...

Is it possible to detect DPI in iPhone OS, or Android?

I'm doing some research on making a game that will be able to scale its graphical resources to suit the DPI of whatever device it's on. In order to do this, I would like to be able to query the DPI of the device, to appropriately scale the assets. It's a 2D game, and the art style suits arbitrary scaling quite well. example of what I ...