dpi

Write dpi metadata to a jpeg image in Java

心已入冬 提交于 2019-11-28 10:54:06
I am trying to programatically set the dpi metadata of an jpeg image in Java. The source of the image is a scanner, so I get the horizontal/vertical resolution from TWAIN, along with the image raw data. I'd like to save this info for better print results. Here's the code I have so far. It saves the raw image (byteArray) to a JPEG file, but it ignores the X/Ydensity information I specify via IIOMetadata. Any advice what I'm doing wrong? Any other solution (third-party library, etc) would be welcome too. import java.awt.image.BufferedImage; import java.awt.image.WritableRaster; import java.io

DPI of image extracted from PDF with pdfBox

China☆狼群 提交于 2019-11-28 09:14:24
问题 I'm using java pdfBox library to validate single page pdf files with embedded images. I know that pdf file itself doesen't contain the DPI information. However the images that have the equal dimensions in the document have different sizes in pixels after extracting and no dpi meta information. So is it possible to somehow calculate the image sizes relative to pdf page or to extract images with their dpi information (for png or jpeg image files) using pdfBox? Thanks! 回答1: Get the

Android xxx-hdpi real devices

给你一囗甜甜゛ 提交于 2019-11-28 06:50:11
I'm gonna release my app, it's a 1.2Mb apk that includes about 120 icons in 4 different formats (ldpi, mdpi, hdpi, x-hdpi). If I add xx-dpi and xxx-hdpi icons the apk grows bigger and loading time increases. There are many entry-level devices out there with really loooow memory and I'd like my app to run everywhere. Do I really need to add xx-hdpi? And is there a real device that requires xxx-hdpi? You shouldn't really need xxxhdpi . It was only introduced because of the way that launcher icons are scaled on the nexus 5's launcher Edit Back when I answered in Jan 2014, the Nexus 5 was the only

Stop Firefox DPI Scaling (when Windows setting is at 125%)

喜欢而已 提交于 2019-11-28 06:17:39
I'm currently making a webpage and testing it in chrome works fine, but in Firefox - it is zoomed in. This is because my DPI in Windows is set to 125%, and Firefox detects this, and adjusts every webpage accordingly. However, my webpage is not meant to be viewed at such a zoom level, the images aren't made to be displayed that big, and hence it looked blurred/pixelated. The general layout of the page is messed up too, because everything is so big. Now, this doesn't affect most people - as their DPI would be at 100% in Windows. However, I want it to be the same on all browsers. I've searched

Android hdpi/mdpi/ldpi for Values folder?

眉间皱痕 提交于 2019-11-28 05:54:40
Android allows us to define hdpi/mdpi/ldpi for the drawable folder in order to account for different sized screens/devices. I was wondering if that same support can be applied for the Values folder (or even the layout folder)? Reason being, I typically define a "sizes.xml" file which holds standard dp sizes that I apply to margins and paddings. I also do the same for sp sizes for text. I'd like to adjust those values based on the phones dpi. Yes, I believe anything in the res/ folder can use "Configuration Qualifiers". So for example, you can have a values-sw600dp-mdpi-land/ folder. See "Using

How can i Make my WinForms Application DPI-Aware

久未见 提交于 2019-11-28 05:02:32
问题 I'm working in a company that has a Winforms application as our flagship product. we recently reworked the branding and UI. We have noticed that the Forms now do not display the text properly and some controls are out of alignment or have disappeared off the edge. Is it possible for me to make the forms on this application DPI-Aware with the least amount of re-factoring as we don't have time. 回答1: It's essential that you don't specify pixel coordinates and sizes. This rules out using Control

What dpi resolution is used for an iPhone App?

余生颓废 提交于 2019-11-28 04:08:59
I am working on a template for an iPhone App and was wondering what dpi resolution is used for it ? 300 or 72 ? I am not sure and I hope somebody can answer me that question. neoneye iPhones iPhone 1/3G/3GS 320 x 480 163 ppi iPhone 4/4S 640 x 940 326 ppi iPhone 5/5C/5S 640 x 1136 326 ppi iPhone 6/6S 750 x 1334 326 ppi iPhone 6 Plus/6S Plus 1080 x 1920 401 ppi Without downsampling: 1242 x 2208 461 ppi Except for the 6th generation (= 5th) iPod touch, all the models are equal to their iPhone counterparts iPads iPad 1/2 768 x 1024 132 ppi iPad 3/4/Air/Air 2 1536 x 2048 264 ppi iPad Mini 1 768 x

How to get DPI in C# .NET?

孤街浪徒 提交于 2019-11-27 23:48:23
I'm trying to build a Windows Forms application using C#. How do I get the DPI in .NET? I've read before that there is DPIX and DPIY, which can be used in .NET to get the current DPI. Is that correct? Thanks all. Use an instance of the Graphics class. You get this using the following within your form (could be in form's Load event handler): float dx, dy; Graphics g = this.CreateGraphics(); try { dx = g.DpiX; dy = g.DpiY; } finally { g.Dispose(); } 来源: https://stackoverflow.com/questions/6844161/how-to-get-dpi-in-c-sharp-net

Declaring high DPI awareness per window on Windows 8

痞子三分冷 提交于 2019-11-27 22:35:57
I'm developing audio plugins that run within a host such as Cubase, and I'm looking to add High DPI support. This is problematic because all host applications that I know of declare themselves as non-high DPI aware, so all windows are scaled automatically by the DWM. I'm looking for a way to turn off DWM DPI scaling for the plugin window, even if the host itself is not DPI-aware (so it uses DWM DPI scaling for all other windows). Does anyone know if this is possible at all? For applications that use a lot of plugins, such as audio hosts, this is a very real problem because they can't just go

C# Scaling UserControl content to match users Dpi/Font Size

爷,独闯天下 提交于 2019-11-27 21:34:06
How do I get my OwnerDrawn UserControl to respect the users dpi (96/120/xxx) and/or font-size (normal, large, extra large)? Some people suggest to use the DpiX and DpiY properties on a Graphics object, but that doesn't seem to to anything in my control (i.e. they are always set to 96, regardless of which font-size or dpi I choose). There is another similar question here on StackOverflow where it suggests to use the AutoScale properties, but the suggested solutions don't really do anything either. Is there no way of doing this in .NET except for relying on WPF? You would need to set the