dpi

Qt5.6: high DPI support and OpenGL (OpenSceneGraph)

蓝咒 提交于 2019-12-01 07:35:41
I have a minimal application which uses QOpenGLWidget that integrates an OpenGL wrapper library (OpenSceneGraph). I am trying to figure out how to correctly use the Qt5.6 support for high DPI screens when dealing with OpenGL content like I use. My main() function has the following code: int main(int argc, char** argv) { // DPI support is on QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication app(argc, argv); QMainWindow window; // QOpenGLWidget with OpenSceneGraph content QtOSGWidget* widget = new QtOSGWidget(); window.setCentralWidget(widget); window.show(); return app.exec(

Storing DPI and Paper Size information in a JPEG with Java

一个人想着一个人 提交于 2019-12-01 06:19:23
问题 I have the following code: ImageIO.write(originalImage, OUTPUT_TYPE, resultOutput); This is an invocation of the following javax.imageio.ImageIO method: public static boolean write(RenderedImage im, String formatName, File output) throws IOException This turns an original BMP image into a JGP output. Is it possible to also store DPI and Paper Size information in the JPEG to aid in printing operations? 回答1: Luckily, the java image I/O API lets you do just that. It also allows for setting the

Change dpi of an image in OpenCV

倾然丶 夕夏残阳落幕 提交于 2019-12-01 05:28:33
When I open an image in OpenCv (which may be of 300 dpi, 72 dpi etc.), the dpi of the image is automatically changed to 96 dpi. I want to variate this dpi. Please help. Thanks in advance... #include "stdafx.h" #include <cv.h> #include <cxcore.h> #include <highgui.h> #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { IplImage *img1=cvLoadImage("input.jpg"); cvSaveImage("output.jpg",img1); return(0); } OpenCV does not support meta-data mangling like this. You need to use another tool to re-set the DPI or consider incorporating libjpeg directly. Another option is to

Qt5.6: high DPI support and OpenGL (OpenSceneGraph)

跟風遠走 提交于 2019-12-01 05:16:52
问题 I have a minimal application which uses QOpenGLWidget that integrates an OpenGL wrapper library (OpenSceneGraph). I am trying to figure out how to correctly use the Qt5.6 support for high DPI screens when dealing with OpenGL content like I use. My main() function has the following code: int main(int argc, char** argv) { // DPI support is on QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication app(argc, argv); QMainWindow window; // QOpenGLWidget with OpenSceneGraph content

Print a Form at higher dpi than screen resolution

眉间皱痕 提交于 2019-12-01 01:27:29
Problem: We need help with how to use WinForms' ability to auto-scale to different DPI’s to allow us to print our Forms at 600dpi, rather than at the screen DPI. For What-You-See-Is-What-You-Get printing, we have been simply taking our nicely laid out window and printing it (turning off scrollbars and buttons and such). That works great EXCEPT for one thing: it comes out at 96dpi or 120dpi (whatever is the screen resolution)… either of which look grainy and unprofessional (our customers are complaining). And although it is as readable as what would be on the screen, you expect printed

How to obtain the real screen resolution in a High DPI system?

谁说我不能喝 提交于 2019-12-01 00:49:55
So, Delphi programs are not DPI aware. This didn't bother me much until recently when I needed the real screen resolution ( Wrong resolution reported by Screen.Width when "Make it easier to read what's on screen" is 150% ) in a computer with High DPI. Some recommended was to make the application High DPI aware (XML manifest) but others are warning us that this involves a lot of work! So, being lazy (or lacking time), I wonder if there is a trick to compute the real resolution. One very dirty trick that cross my mind would be to create a companion tool (tiny console app) that is DPI aware. All

How to get the dpi of an image(Java)

牧云@^-^@ 提交于 2019-11-30 21:26:15
In c#, we can use Image.HorizontalResolution and Image.VerticalResolution. But in java, how to get it? I found ImageInfo.java , but it only support a few image types. http://kickjava.com/src/imageinfo/ImageInfo.java.htm You can use Apache Commons Sanselan library to get image info: http://commons.apache.org/imaging/index.html . final ImageInfo imageInfo = Sanselan.getImageInfo(file_); final int physicalWidthDpi = imageInfo.getPhysicalWidthDpi(); final int physicalHeightDpi = imageInfo.getPhysicalHeightDpi(); With the help of an ImageReader instance, you can get the image meta data in a neutral

high DPI problems

筅森魡賤 提交于 2019-11-30 21:22:55
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 obscuring other controls or eachother. The screen should look like this: http://www.manageinvest.com/good.jpg ..and on high DPI it ends up looking like this: bad.jpg (this is my first post so i am only allowed one link) Any suggestions? Thanks in advance, Kristian In

Print a Form at higher dpi than screen resolution

笑着哭i 提交于 2019-11-30 20:32:20
问题 Problem: We need help with how to use WinForms' ability to auto-scale to different DPI’s to allow us to print our Forms at 600dpi, rather than at the screen DPI. For What-You-See-Is-What-You-Get printing, we have been simply taking our nicely laid out window and printing it (turning off scrollbars and buttons and such). That works great EXCEPT for one thing: it comes out at 96dpi or 120dpi (whatever is the screen resolution)… either of which look grainy and unprofessional (our customers are

Setting DPI for PNG files

醉酒当歌 提交于 2019-11-30 19:48:12
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 the xDensity and yDensity to 300, and resUnits to 1, using getAsTree(), and then expand the diagram by a