dpi

Setting DPI for PNG files

本小妞迷上赌 提交于 2020-01-11 02:16:32
问题 I have a bunch of diagrams created using a Java diagramming tool that I wrote - they are mostly black and white diagrams, with the blocks in aqua, and occasional other colours. They are currently being saved as JPG files, and I want to insert them into a book that I am preparing for Print On Demand. The book is an OpenOffice ODT file, which will later be converted to a PDF. Currently I use JPG files, but the print facility they use requires 300 DPI, so I modified my diagramming tool to set

WPF DPI issues

为君一笑 提交于 2020-01-10 20:08:25
问题 I have developed an application that looks great on my computer but when I install it on other computers with different resolutions and DPI settings, it looks terrible. Controls overlap eachother and it's just miserable. Does anyone have any suggestions on how to avoid this? 回答1: There's no way for Windows to know the native DPI (Dots per inches) of your screen, since there's physically no way that the screen can tell it to the computer. This means that a lot of people will have DPI settings,

WPF DPI issues

走远了吗. 提交于 2020-01-10 20:08:12
问题 I have developed an application that looks great on my computer but when I install it on other computers with different resolutions and DPI settings, it looks terrible. Controls overlap eachother and it's just miserable. Does anyone have any suggestions on how to avoid this? 回答1: There's no way for Windows to know the native DPI (Dots per inches) of your screen, since there's physically no way that the screen can tell it to the computer. This means that a lot of people will have DPI settings,

Android drawable微技巧

Deadly 提交于 2020-01-08 03:08:49
家都知道,在Android项目当中,drawable文件夹都是用来放置图片资源的,不管是jpg、png、还是9.png,都可以放在这里。除此之外,还有像selector这样的xml文件也是可以放在drawable文件夹下面的。 但是如果你现在使用Android Studio来新建一个项目,你会发现有如下的目录结构: 嗯?怎么会有这么多mipmap开头的文件夹,而且它们的命名规则和drawable文件夹很相似,也是hdpi、mdpi、xhdpi等等,并且里面还真是放的图片,难道Android项目中放置图片的位置已经改了? 对于刚刚从Eclipse转向Android Studio的开发者们可能会对mipmap文件夹感到陌生,其实不用担心,我们平时的编程习惯并不需要发生任何改变,因为mipmap文件夹只是用来放置应用程序的icon的,仅此而已。那么在此之前,我们都是把应用程序的icon图标和普通的图片资源一起放到drawable文件夹下的,这样看上去就会比较杂乱,有的时候想从一堆的图片资源里面找icon半天也找不到,而文件一多也就容易出现漏放的情况,但恰恰Android是极度建议我们在每一种分辨率的文件夹下面都放一个相应尺寸的icon的,因此将它们独立出来专门放到mimap文件夹当中就很好地解决了这个问题。 另外

Android drawable微技巧

雨燕双飞 提交于 2020-01-05 17:09:12
家都知道,在Android项目当中,drawable文件夹都是用来放置图片资源的,不管是jpg、png、还是9.png,都可以放在这里。除此之外,还有像selector这样的xml文件也是可以放在drawable文件夹下面的。 但是如果你现在使用Android Studio来新建一个项目,你会发现有如下的目录结构: 嗯?怎么会有这么多mipmap开头的文件夹,而且它们的命名规则和drawable文件夹很相似,也是hdpi、mdpi、xhdpi等等,并且里面还真是放的图片,难道Android项目中放置图片的位置已经改了? 对于刚刚从Eclipse转向Android Studio的开发者们可能会对mipmap文件夹感到陌生,其实不用担心,我们平时的编程习惯并不需要发生任何改变,因为mipmap文件夹只是用来放置应用程序的icon的,仅此而已。那么在此之前,我们都是把应用程序的icon图标和普通的图片资源一起放到drawable文件夹下的,这样看上去就会比较杂乱,有的时候想从一堆的图片资源里面找icon半天也找不到,而文件一多也就容易出现漏放的情况,但恰恰Android是极度建议我们在每一种分辨率的文件夹下面都放一个相应尺寸的icon的,因此将它们独立出来专门放到mimap文件夹当中就很好地解决了这个问题。 另外

Calculate screen DPI

耗尽温柔 提交于 2020-01-04 02:29:13
问题 I am using Python to build an image-rendering app that renders numpy arrays as images. I need a way to automate the calculation screen DPI, as I am generating images of the same size on different monitors (e.g., 2x2 inches). I am in Windows 10, Python 3.7. I am not asking how to get the monitor's screen size -- like finding out if your monitor is 3000x2000 pixels (as was solved at: How do I get monitor resolution in Python?). Rather, I want something that calculates DPI speficially, and takes

How to increase jpeg image ppi or dpi in java?

落爺英雄遲暮 提交于 2020-01-03 06:40:11
问题 I am creating a java program which I need to increase input JPEG image's PPI/DPI and save it as JPEG. Anyone can give me some hits on if this is workable? 回答1: You can do it like in this answer, except you have to use "jpeg" as the format name and you need to implement the setDPI method to work with JPEG-specific metadata. public static final String DENSITY_UNITS_NO_UNITS = "00"; public static final String DENSITY_UNITS_PIXELS_PER_INCH = "01"; public static final String DENSITY_UNITS_PIXELS

How can I set Windows “DPI-scaling overrides” via a script?

ε祈祈猫儿з 提交于 2020-01-03 06:27:49
问题 We have a Python-based application with a WxPython GUI that we create for multiple operating systems. In Windows 10, at least in my environment (inside a VM on a high resolution monitor), the text elements in the interface are blurry. I can improve the appearance by setting the Windows application DPI-scaling override. However, the only way I have found so far is to do it manually from the Windows file explorer interface. My question: Is there a way to set this property from the command line

How can I set Windows “DPI-scaling overrides” via a script?

不问归期 提交于 2020-01-03 06:26:34
问题 We have a Python-based application with a WxPython GUI that we create for multiple operating systems. In Windows 10, at least in my environment (inside a VM on a high resolution monitor), the text elements in the interface are blurry. I can improve the appearance by setting the Windows application DPI-scaling override. However, the only way I have found so far is to do it manually from the Windows file explorer interface. My question: Is there a way to set this property from the command line

How can you calculate the appropriate Font Size if the deployment PC has a different font DPI?

蓝咒 提交于 2020-01-03 03:59:05
问题 I'm trying to figure out the font DPI size on the target Windows machine and modify our app's font so that it appears the same size as it would if the target machine had the same dpi as the dev machine. (So a larger Target DPI would mean we'd make our fonts smaller than at dev time). I'm wondering if there are any problems with the solution below and specifically whether LOGPIXELSX=88 is correct. Background I resize all controls and fonts on our forms to match the current Windows screen