Gimp: Increasing resolution doesn't shrink image? - resolution

I'm so done with this topic ... resolution, pixels, inches, ppi, dpi and all that stuff. I never find a source of explanation which puts me in a state of not-wondering-anymore. Once I have reached that state I'll write a blog post myself.
So, first question: I have an image which I open in Gimp. I click on "Image -> Scale Image". It says my image has 826x1169 pixels at a ppi of 100. Thus the width of my image must be 8,26 inches. I held a goddamn ruler against my screen (feeling stupid doing this): width is 6,1 inches. Why not 8,26? The image demands that its 826 pixels are displayed at a ppi of 100. Why does my screen say "Nope, I only have 6,1 inches for you today, buddy. So I'll squeeze your 826 pixels into those 6,1 inches, enjoy your ~135 ppi lol bye."
Second question, same image: Again I click on "Image -> Scale Image". The "X resolution" and "Y resolution" are chained together. I take it down from 100 to 50/20/whatever. I click on "scale", feeling very confident that my image will shrink since I demand the machine to use more of my precious 826 pixels for each inch ... aaand: nothing changes.
Can someone enlighten me? I got a feeling that both questions are related somehow.

Related

Godot pixelated image

Godot 2d project, I created at 640 640 png using Gimp.
Imported those PNG's to Godot as texture(2d).
After setting scale to 0.1, I resized those images to 64 x 64 in godot scene.
When I initiate this image in my main scene, I get this pixelated disgusting result.
Edit : Dont be confused with rotated red wings, I did it at runtime. Its not part of the question.
My window size is 1270 x 780
Stretch Mode is viewport.
I tried changing import settings etc.
I wonder is it not possible to have a sleek image in this sizes?
Disclaimer: I haven’t bothered to fire up Godot to reproduce your problem.
I suspect you are shooting yourself in the foot by that scale 0.1 bit. Remember, every time you resample (scale) an image there is loss.
There are three things to do:
Prepare your image(s) to have the same size (resolution) as your intended target display. In other words, if your image is going to display at 64×64 pixels, then your source image should be 64×64 pixels.
When importing images, make sure that Filter is set to ☑ On. If your image contains alpha, you may also wish to check the Fix Alpha Border flag.
Perform as few resampling operations as possible to display the image. In your particular case, you are resampling it to a tenth of its size before again resampling it up to the displayed size. Don’t do that. (This is probably the main cause of your problem.) Just make your sprite have the natural size of the image, and scale the sprite only if necessary.
It is also possible that you are applying some other filter or that your renderer has a bad resampler attached to it, but your problem description does not lead me to think either of these are likely.
A warning ahead: I'm not into godot at all, but I have some experience with image resizing.
Your problem looks totally related to pure image resizing. If you scale down an image in one go by any factor smaller than 0.5 (this means make it smaller than half its original size), you will face this effect of an ugly small image.
To get a nice and smooth result, you have to resize it multiple times:
Always reduce the image size by half, until the next necessary step is bigger than scaling by 0.5.
For your case (640x640 to 64x64) it would need these steps:
640 * 0.5 => 320
320 * 0.5 => 160
160 * 0.5 => 80
80 * 0.8 => 64
You can either start with a much smaller image - if you never need it with that big size in your code, or you add multiple scaled resolutions to your resources, or you precalculate the halfed steps before you start using them and then just pick the right image to scale down by the final factor.
I'm not very experienced with godot and haven't opened it right now, but I could imagine that you shouldn't scale the image to 0.1 because then there will be a loss in image quality.

What is the real definition of resolution?

I read everywhere that resolution is defined by the number of pixels on a screen.
But if you imagine 1000 x 1000 pixels on a screen the size of 20 skyscrapers and compare it to 999 x 999 pixels on a box of matches, the resolution would make the skyscrapers screen look 'low-res' and the box of matches screen look 'high-res'. Instinctively, I would say that the box of matches screen is higher resolution than the skyscrapers screen.
Am I wrong to say this? Is resolution definitely defined by the total number of pixels instead of the dots per inch?
Indeed, in the context of displays, the term resolution says nothing about pixel density. As stated in Wikipedia's article on Display Resolution:
The term "display resolution" is usually used to mean pixel dimensions, the number of pixels in each dimension (e.g. 1920 × 1080), which does not tell anything about the pixel density of the display on which the image is actually formed: broadcast television resolution properly refers to the pixel density, the number of pixels per unit distance or area, not total number of pixels. In digital measurement, the display resolution would be given in pixels per inch (PPI)
Definition of resolution varies according with the context. Every thing has a measurement unit.
When you talk about screens(Monitors), screen has pixels not dots thats why its resolution is measured in Pixels.
And When you talk about printing or video it is all about dots per inch. In your case, Box of Match is not a screen, its on printed paper.
For eg: you might have heard people saying DPI's(not resolution) while scanning documents.
So don't get yourself confused with the definition of resolution that is meant for different context.

Which unit of measurement is used in this Office Open XML Element

The following element is a pic, it can be parsed by PowerPoint. I got confused with it's
measuring units for a couple of hours.
English Metric units (EMUs), points, picas, and inches ?
DPI=96
xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
<p:pic>
....
<a:srcRect l="5556"/>
<p:spPr bwMode="auto">
<a:xfrm>
<a:off x="3545" y="759"/>
<a:ext cx="782" cy="150"/>
</a:xfrm>
.....
</p:spPr>
</p:pic>
English Metric Units are used for measuring sizes and positions of Vector Drawing and Pictures. Everything you need w.r.t. to Measuring Units in Open XML can be found here.
Hope this helped.
This involves more than a mere measure unit...
"DPI 96" comes from a VGA screen size of (or mode) 640x480... maybe other values you could find out there can be "DPI 72" for an EGA screen size of 640x350 or "DPI 48" for a CGA screen size of 640:200 ...
Those things came from the very beginning: MSDOS, Macintosh(Sw&Hw) and IBM PC. On those years (80's) there was several graphic modes each with their own pixel size that graphical drivers managed to draw on those very primitive monitors (very low resolutions and screen size, monochrome, no standars!). DPI 96 stands for "dot per inch 96x96", as VGA pixel is a square of 96x96. CGA and EGA have rectangular pixels of 48×96 and 72×96 respectively...
I'm sure that checking this URLs will help you...
Where does 96 DPI come from in Windows?
DPI & PPI explained

Preparing the images for retina-ready (web)

I have a question that have been on my mind for several time now: how should I prepare the images that I am going to use on a website to be retina-ready?
Yes, I have been spending hours on the interweb on this topic, but so far I haven't find the one 'ultimate answer'.
In this thread for example (link: image size for retina display), it is only mentioned that I need to double the dimensions. But how about the resolution?
Real life situation: an image is created using Photoshop (or whatever your fix) at dimension 400px x 200px, with resolution of 72 ppi.How should I modify this image?
800 x 400px at 72 ppi (just resize it, times two)
800 x 400px at 144 ppi (dimensions and resolution times two)
400 x 200px at 144 ppi (just double the resolution)
400 x 200px at 246 ppi (same dimension, higher resolution --I got the number 246 from some tutorial in designing ipad wallpaper)
...et cetera... ??
The target is to select the images and display them on both non-retina and retina displays (i.e. 'normal' computers / laptops, macs (both versions, retina and non), iDevices, Androids, et cetera)
Looking forward for any feedbacks :-)
You could use Retina.js to replace the image with a higher resolution version, but only if the users device is equipped with a retina display.
The question you link is correct. You need to double the size of the image to double the resolution.
What you are getting confused over is the PPI. PPI is Pixels Per Inch, it is simply a measure of how big a picture is, same as display dimensions.
One is not independent of the other.
An image of 400x200 will take up as much screen space on a 72 ppi display as a 800x400 image on a 144 ppi display. The difference is simply that the 144 ppi device is able to fit more pixels in one inch of screen space than the 72 ppi.
So, by doubling the resolution of a 72ppi image, you are indeed insuring that it looks the same/takes the same amount of screen space.
There's a new responsive images HTML5 standard. As of July 2014 it's only in beta builds of browsers yet. But the Picturefill polyfill is already available.
This article explains different use-cases quite well. But what you want here is to simply provide an alternative image for high-resolution (e.g. 'retina') displays:
<img srcset="small.jpg 1x, large.jpg 2x"
src="small.jpg"
alt="A rad wolf" />

HTC Desire resolution of the screen

I took a look at the phone specifications and is says something like this
"HTC Desire. It comes with a 3.7" LCD screen (480 x 800 pixels of resolution)"
ok the screen is 480x800 pixels but how many dips it has ? and how do I calculate that.
Also it is confusing for me the fact that Desire HD has the same resolution 480x800 pixcels, and they both use hdpi images. I have application and when I install myApp they both use the images from hdpi folder
can someone tall me what is the resolution in dips in desire and desireHD ?
You can get information about display, such as size, density, and font scaling using DisplayMetrics.
Documentation gives a usage example.

Resources