Re: I'm stumped! Image import scaling issue.
OK guys. This is puzzling.
Here I have this simple logo which is 256x256 pixels in size.
http://www.comptoir-hardware.com/ima...eader_logo.png
I open it in Xara P&G Designer, put some things on top of it like text or the like, and then I want to export it at 1:1 pixel size ratio.
First of all, I can't seem to make Xara show that icon at 100% on the screen. At 100% zoom ratio, it is much too large. At 66% or so it seems about right. But why is that, and how can I set Xara up to show imported bitmap images at 1:1 pixel resolution on the screen?
Same question when exporting. How on earth can I save a modified bitmap e.g. as PNG such that one pixel in the exported PNG matches one pixel in the original bitmap?
Regards David.P
Re: I'm stumped! Image import scaling issue.
Typically for this type of thing, I import the image(s) into the Blank Photo document type.
That icon is 256 x 256 pixels. When you import it, just click on the page. Don't resize it. It exports out at 256 x 256 pixels. Pixels have no size to them. Unless there is DPI information stored inside, most Windows applications assume 96 dpi and place it accordingly. Which makes your sample image 2.66" in diameter.
In the end, all that matters is pixels, not DPI.
2 Attachment(s)
Re: I'm stumped! Image import scaling issue.
following on from what Mike said..
I opened your image in both xara designer and photoshop [both at 100% zoom] and they are the same size on my monitor as the image link you provided [viewed in FireFox at 100%]
Attachment 100636
now xara will export this image at 256pixels/96dpi the same size/ratio as it was imported at - and if you view it then at a different dpi it will look a different size
it may be that you are viewing it in software afterwards that displays it at 72dpi [100% zoom] - in which case you need to appreciate the difference: xara displays at 96dpi [100%zoom], and work accordingly - [72dpi would be about a third bigger as you report, 256/72 being a third bigger than 256/96]
also if you are viewing it on two different monitors that are not set to the same windows resolution and or are manufactured to a different 'dot/LED pitch' - well that of course will have an effect too :)
the options\view tab\ bitmaps [in the middle] may be useful to you, there are three options - the first to resize large photo's is the default and it may cause you grief with larger images [it's a web-design thing], the second option is better for you I think: 'import all photos at 96 dpi [1:1 at 100% zoom]', whereas I have mine set on the third for preference...
Attachment 100637s
Re: I'm stumped! Image import scaling issue.
OK, I found that my copy of that logo:
http://666kb.com/i/clqvgbv559zov8fdr.png
...actually had an internal DPI setting of 72x72 which for some reason made it import and export at a size of 341,6 x 341,6px instead of its original size of 256 x 256px.
The logo linked in my above post however has no internal DPI set and imports/exports correctly at 256x256px.
However, both versions of the logo are still displayed much too large (and therefore garbled) at 100% zoom in Xara.
Thus, two Xara drawbacks remain in my view:
1.) It is not possible to simply import, edit and export bitmaps at their native pixel size regardless of a dpi setting they might have; and
2.) Bitmaps are shown at a wrong size on the screen at 100% zoom (at least when the Windows dpi settings are not standard, like in my case at 125%, which is more and more common with todays higher resolution screens.
Below screenshot shows shows the whole matter.
http://666kb.com/i/clqwdxdudy5sypj33.png
Cheers David.P
Re: I'm stumped! Image import scaling issue.
ok - the 'pixel size' of 341.6 you see on the info-bar at the top is not the size of the image itself, it is the size of the representation in the work space - the representation in the workspace has been increased in size by a third because that shows on the screen at the size it would print at 72dpi [a third higher than it would print at 96dpi] - but the image itself is not changed and will export at 256 pixels as long as you do not resize it - if you want confirmation of this look in the bitmap gallery where the actual size of the image in pixels is given
in doing this it assumes that screen images will always be 96dpi [strictly ppi for screen - pixels per inch] because it is a windows program and that is what the windows standard is - if you are working to another OS/standard you have to adjust accordingly - if you import an image for screen at 72dpi you can either work at 75% or you could work at 100% and have a new view set at 75%
I looked at your images and they are as I expected from reading your last post
yes of course increasing the size of the windows resolution will increase the size of the images on the screen - that's the whole point ! - do you have a program where this does not happen?
so if you reset your windows dpi/ppi to 100% then you will see the 'without internal' image will be the correct size; [and the 72dpi will be a third larger for reason stated above]
you can try working in xara at 80% zoom which is the ratio of 100:125, to take account of your windows dpi setting
6 Attachment(s)
Re: I'm stumped! Image import scaling issue.
Quote:
Originally Posted by
David.P
OK, I found that my copy of that logo: ...actually had an internal DPI setting of 72x72 which for some reason made it import and export at a size of 341,6 x 341,6px instead of its original size of 256 x 256px.
The logo linked in my above post however has no internal DPI set and imports/exports correctly at 256x256px.
However, both versions of the logo are still displayed much too large (and therefore garbled) at 100% zoom in Xara.
Thus, two Xara drawbacks remain in my view:
1.) It is not possible to simply import, edit and export bitmaps at their native pixel size regardless of a dpi setting they might have; and
2.) Bitmaps are shown at a wrong size on the screen at 100% zoom (at least when the Windows dpi settings are not standard, like in my case at 125%, which is more and more common with todays higher resolution screens.
...
Cheers David.P
First, no they do not display too large...An application is a mathematical beast. Everything about it from the guts you do not see to what you do see and interact with relies on math. And it is the underlying math in (nearly) every Vector application that affects the size display size of bitmap images. Different vector applications use various math assumptions. This also applies to Xara's Photo template because at heart, even that mode is vector.
Adobe Illustrator, unlike Xara products, uses points per inch. There are 72 points per inch. Any bitmap without a DPI (it's just two bytes worth of information in the header) is placed at that 72 points per inch. And will look incorrect (pixelated). On the other hand, a bit map with a DPI in the header will be placed mathematically "correct" and will not look pixelated. They will be of the exact same relative size as you see in Xara products, it is just that the one with the DPI will look better.
Your images examples:
First, note the red rectangle at the top of the page. It is displayed as being 612 pts. 612 / 72 = 8.5", which is the page width of the document I have open.
Attachment 100640
Now the two images you have in this thread, beginning with the latest one, the bitmap with a DPI in the header. Note that in Illustrator, it displays without pixelation, the exact opposite of Xara.
Attachment 100641
And now the first one you posted a link to, the smaller one. Note that it is the one that looks pixelated.
Attachment 100642
In either application, one needs to size an image that does not correspond to its mathematical assumptions. In Xara's case, sizing the last image you posted to be 256 x 256 px results in a non-pixelated view of the image. Here, I have imported the latest version, the one with the DPI in the header, made a copy and resized it to 256 px.
Attachment 100643
In Illustrator's case, I need to resize the original image you linked to in order for it to not display pixelated. In this screen shot, I have resized the image without the DPI in the header to the size of the one with the DPI in the header.
Attachment 100644
To further illustrate the issue, take a look at the following screen shot from PhotoLine. Top image is the original, no DPI image. Bottom is the latest image with DPI. Note in the title bar PhotoLine is displaying each at 100% size and each are the same viewable size. This is because most all Bitmap Editors rely upon pixels to render images. In this case, each of the two images have a physical size of 256 px square. So that is what PL displays.
But also note the ruler. The original image without DPI has a smaller "inch" size than the image with the DPI in the header. But at its heart, PL is a bitmap editor. Photoshop displays exactly the same as PL. Including the ruler dimensions.
Attachment 100645
Mike
Re: I'm stumped! Image import scaling issue.
yep mike - if the image is being viewed without any application applied screen anti-aliasing - good point
[we could also go into the technicalities of the various ways in which different monitors actually physically render pixel units to the screen :)]
Re: I'm stumped! Image import scaling issue.
Thanks guys but sorry, I'm not so much interested in the subtleties of image resolution (dpi) vs. image size (pixel), which I am aware of btw.
99.9% of my usage scenarios I don't care at all about dpi values that might be contained in bitmaps. Most of the time, those are meaningless, or useless anyway.
For a quick bitmap editing experience (like adding a shadow, caption, overlay or the like) I simply need, regardless of any dpi value possibly hidden in the bitmap:
a) to view the bitmap like this: "1 image pixel = 1 screen pixel" on the screen; and
b) the possibility to export the bitmap like this: "1 image pixel = 1 screen pixel = 1 file pixel".
Both seems to be complicated if not impossible in Xara P&G Designer, unfortunately.
Which is of course still my favorite, best graphics editor of all times.
Anyway, thanks to handrawn for the 80% zoom tip in Xara. This indeed compensates exactly for my 125% enlarged Windows dpi setting.
Cheers David.P
1 Attachment(s)
Re: I'm stumped! Image import scaling issue.
Don't think it's been mentioned up to now, but there is an operation in the photo tool that does exactly what you're asking for.
1) Go to Photo tool.
2) Click 'Scale photo to 100%'
Attachment 100646
Re: I'm stumped! Image import scaling issue.
Great find, Luke! Thanks.
This indeed solves above problem a).
However, if I export a bitmap after having pressed the button you mentioned, the bitmap is exported at 1/1,25 size, namely at 205 x 205 pixels if the above logo example is used :banghead:
Thus, problem b) remains.
1 Attachment(s)
Re: I'm stumped! Image import scaling issue.
DPI is relevant as far as the receiving application if it uses it for initial sizing. Which most applications do.
So what you are left with is either resizing in Xara (or Illustrator, or...) to the pixel dimensions, or use a bitmap editor and change it to 96 DPI. Or automagically use the Photo tool and click on the 100% scale button.
The screen shot below has on the left the image without the DPI in the header. The one in the center is the one with the DPI in the header, but it has been changed to 96 dpi. The one on the right has had the photo tool/100% scale button. It doesn't matter which option you use. And of course, if you set your dimensions in Xara products to use pixel measurements, you can just do it on the info bar if you know the dimensions.
Attachment 100648
2 Attachment(s)
Re: I'm stumped! Image import scaling issue.
Quote:
Originally Posted by
David.P
Great find, Luke! Thanks.
This indeed solves above problem a).
However, if I export a bitmap after having pressed the button you mentioned, the bitmap is exported at 1/1,25 size, namely at 205 x 205 pixels if the above logo example is used :banghead:
Thus, problem b) remains.
When I export your resized image using the 100% scale button, the dialog I get is:
Attachment 100649
And bringing it back into XDP, it is sized appropriately. It has been reimported and is on the left. The info bar reports it properly.
Attachment 100650
Re: I'm stumped! Image import scaling issue.
The export size problem is further complicated by the export dialog which seems to have one or two bugs:
http://666kb.com/i/clrbahgf8svet8nof.png
Here is what I get if I leave the dialog at 96 dpi:
http://i.imgur.com/yk9gy0n.png
The image is scaled down to 205 pixels :(
Re: I'm stumped! Image import scaling issue.
no problem here entering three number [or for that matter four number] dpi - I'm inclined to think that's a consequence of your windows setting at 125%, which I am pretty sure the xara UI is not designed for [so not a bug, but a situation that is beyond it's intended use] - Luke might know for sure maybe
the scale % does not appear active for PNG or JPG, but is for GIF and BMP - no idea why that is, it's a feature I've never used [or had a use for]
as to why your image is down to 205 pixels - well did you resize it in the workspace? - if you post up the xar file with it in, together with the source file you imported, can do a more meaningful test other than just guess ;)
Re: I'm stumped! Image import scaling issue.
Handrawn...you need to just click on the 100% scale button once you select the photo tool.
Re: I'm stumped! Image import scaling issue.
mike - the scale button on the first screen shot in post #33 that I was replying to, is the one in the bitmap export dialog tab, not the one in the photo tool Luke referred to ...
1 Attachment(s)
Re: I'm stumped! Image import scaling issue.
Ok, here's three versions of the logo in one file, 72dpi, 96dpi and 120dpi:
http://666kb.com/i/clrgrns4486baq4f3.png
The 96dpi logo exports correctly (at 256² px²) but displays too large, the 120dpi logo displays correctly but exports too small (at 205² px²), and the 72dpi logo is wrong in both aspects (display and export).
The *.xar file is attached, in the hope that someone can tell me a simple workflow where bitmaps are displayed AND exported correctly instead of garbled.
To me the only way at the moment seems to be the following:
1.) Set the internal dpi number to 96 using an external program like IrfanView or Faststone Viewer (since Xara also doesn't seem to be able to change dpi of bitmaps on the workspace)
2.) Import bitmap to Xara
3.) Set view size in Xara to the reciprocal of the Windows dpi settings (e.g. 80% when Windows dpi is set at 125%) --> bitmap is shown at 1:1 file pixel to screen pixel ratio
4.) Export bitmap at 96dpi --> bitmap gets exported at 1:1 screen pixel to file pixel ratio.
Attachment 100653
PS: Still can't enter any number with more than 2 digits in the export file dialog's dpi box, manually:
http://i.imgur.com/yk9gy0n.png
Not even with copy and paste, and neither by choosing "150" from the dropdown list and replacing the "5" by a "2".
:banghead:
Bummer, since entering 120dpi would solve the export part of the problem...
Re: I'm stumped! Image import scaling issue.
I'll look at the xar file meanwhile:
you can 'change' the dpi of a bitmap in xara - by making a bitmap copy and entering the new dpi - ok its a copy, but it's changed :)
as far as the three numbers go - did you reset you windows to 100% and see if that fixed it?
Re: I'm stumped! Image import scaling issue.
Thanks hand, will do that till tomorrow since it requires rebooting.
Re: I'm stumped! Image import scaling issue.
Quote:
Originally Posted by
David.P
...bitmap gets exported at 1:1 screen pixel to file pixel ratio...
Thanks for the file...Now, I am not running a localized version of the application, so I don't know if that makes a difference.
How are you determining that the file is displaying wrong? In what? Once the image with the DPI in the header is correctly sized, it exports at that identical size (the 256 px). At least here. But I am also not running Xara with the large fonts.