I have recieved by email, than downloaded, the picture that you can see opened with Photoshop in the screenshot below.
That picture was created - and was meant to remain - wider than high.
How come Photoshop "sees" its height bigger than its width?
I add the detail that, opening it only with some software (Paint, Picasa viewer,...), I see the picture squeezed horizontally of about 50%: this way, width is smaller than height to my eye too.
Any help/hint to understand the reasons and to avoid such ambiguity in viewing?
I have now found out what was making the problem occur.
Right-clicking the image icon one can access the image/file properties, on Windows OS.
Properties > Details > Image: here I found horizontal and vertical resolution.
Since the first was set to 200dpi and the second to 400dpi (by mistake in this case!), the image aspect-ratio appeared to be altered from what was expected. It was now very easy to edit such couple of values using - for example - Photoshop's Image size menu.
Related
We are running cobalt with openGL enabled, and the graphics appear to display correctly under 1920x1080 resolution.
But once in a while, some icons in the "Settings" menu may have unexpected vertical lines on top (as shown in the picture).
We are guessing the icons are created from TTF font file, but we are not sure how it is rendering onto the screen.
We want to dump the icons to file at the following points to check what went wrong.
When the icon is actually converted to image.
When the icon experience further modification. (eg, color change, bolding, etc)
When the icons are rendered onto screen canvas.
Would really appreciate if someone can help to point out where in source code these events may be happening.
I guess the first question is: are you running the stable branch or the experimental branch of Cobalt?
Beyond that, yes, the icons are created from a TTF font file that is downloaded remotely. The icon itself is simply a character that is converted into a glyph, like the text above it, albeit at a much larger size.
I believe that the logic that you're looking for is within RenderText() in cobalt/renderer/rasterizer/skia/render_tree_node_visitor.cc. SkCanvas::drawTextBlob() is passed the glyph and color information that it uses to render the icon.
The specific glyph that is being used looks correct, but the location where the render_tree::GlyphBuffer representing it is created is TextShaper::CreateGlyphBuffer() in cobalt/renderer/rasterizer/skia/text_shaper.cc.
I don't remember how it started, although I believe it began after using 3D tools at one point. I was looking for TWO answers, if possible:
For some reason, I find this hard to describe in words, so following the description is a link to a screenshot.
When I open, or create a new image followed by pasting an image from the Clipboard, in Photoshop, there is this zone at the top-left of the image window containing a smaller image, which is surrounded by an area that appears to be transparent - but when clicked on, or the window itself is moved, this "picture-in-picture" feature disappears - then comes back after the dragging is finished.
SCREENSHOT: http://i.imgur.com/MJq8I1W.jpg
1) What is this "feature" named?
2) How do I turn it off?
Thank you!
I don't think I can tell what you hit, or where this is located from the image you shared... can you upload a more comprehensive interface snapshot? It feels like you simply have a duplicate layer on top of your main layer...
Perhaps take a look at your workspace settings and try going to essential and see if that preview panel goes away.
I'm running out of hair to pull. I created two icons:
icon#2x.png (114x114)
icon.png (57x57)
For some reason they appear half sized, however. See this screenshot:
https://docs.google.com/open?id=0BxSFZAq0OUFGbXFWbWNTVlo3RHc
I'm 100% confident my icon sizes are as described. Any ideas why this might happen?
Some side notes that may or may not be relevant:
- I'm using PhoneGap + JQueryMobile, not that that should mapper
- I dragged a reference to the two icons into the Resources/icons folder, replacing the original icon.png and icon#2x.png files.
I had this problem as well. I experimented and discovered that it is related to the pixels/inch resolution. icon#2x seems to want 150 pixels/inch for full size, 300 pixels/inch gives half size, and 600 pixels/inch (which is what I was using) gives quarter size. As near as I can tell, image resolution didn't really have that much of an impact on the quality of the image when placed on an iPhone. My icon is very sensitive to rendering, so any degradation of image quality would have been readily noticeable.
Changing all the icons to 72dpi from 300dpi solved my problem.
Check the icon, as this is png image there was transparent background so crop the png file that starts with postion where blue color starts in the image. This solves your problem
I just had the same issue. My solution was to just open them in Xee (probably lots of other programs will do the trick) and resave them as png. My icons were originally created in gimp and this may something to do with they way that gimp saved them.
Exactly same thing happened to my defaults files - the same solution fixed it.
I had this issue when creating assets with Gimp. To solve it I unchecked "Save resolution" in the export dialog.
I need to develop a desktop application which will
1.) have a list of the Different Application logos (Background Transparent) e.g. IE, FIREFOX, CHROME, PHOTOSHOP ETC.
2.) User will take a screenshot of desktop and save the image.
3.) Now my application need to search all the logos in the screenshot image and tell which all logos are present and where.
4.) I used OPENCV, it's working, but when user changes the desktop background & captures screenshot, it's not working as the transparent area of logo is getting the desktop background content.
Can somebody provide a solution or libraries open source, commercial to do this job.
This is easy to do using cross-correlation.
See my answer to this question.
Basically:
Start with desktop image and one template image for each icon
Apply edge detection (e.g. Sobel) to the desktop image and template images.
Throw away the original desktop image and templates, you won't need them anymore cause we'll be using the edge-detected images
For each template
Do template matching as you normally would
Threshold the maximum of the result. If it's above the threshold, you have a match at that position. Otherwise, no match.
If your icons are aligned in a grid on the desktop, you may be able to speed up your processing by only checking those specific grid positions.
EDIT
You can also save a lot of time by knowing which icons to search for. If you have access to the file system, then just look for *.lnk files (or any other extensions you may be interested in) in the directory that corresponds to the desktop (can't remember exactly what it is, but for Windows7 it's something like c:\users\misha\desktop). That will tell you what icons are there on the desktop. This will allow you to shorten your template candidate list before you go and do the template matching.
I like misha's answer and I think it should work for you. But it that doesn't work you could try replacing the transparant pixels in your reference logo with uniformly distributed random noise before trying the match. This will make the transparant pixels irrelevant for any matching computation because they will match just as bad no matter what there is on the desktop in those pixels.
I'm not familiar with the tools you're using, but I'm guessing you have to either:
a) Tell your program to ignore transparent pixels in the icon images during the comparison operation.
OR
b) Tell your program to treat transparent pixels in the icon images as "wildcards" which can be any color.
Is there any way in Crystal Reports(v11, if this matters) to prevent the images from stretching itself to fit in the whole OLE-object? I'm loading the images dynamically from a database and don't know their aspect ratio.
Thanks for help.
i found the answer here
To make the image resize properly, you must perform the following steps in order:
Set the image's EnableCanGrow to true
Calculate and set Width and Height to the needed size
Set the image's EnableCanGrow to false
Fill the DataSet's image object with data
Continue with normal report processing.
If you get these items in the wrong order, or skip an item, you will
find that Crystal Reports scales the image in unexpected and unrecoverable ways.
The Crystal OLE object, which shows pictures from files, can only be set programmatically so for a 'pull' type report, where you are supplying a dynamic image name, of either portrait or landscape orientation, at least one of those orientations will get squashed to fit. It is better, IMHO, to show thumbnails and then have a calculated hyperlink to show the real picture in some decent viewer. You will spend an unreasonable amount of time trying to get the OLE object that shows pictures to understand that your image has a different aspect ratio. As long as it is at least reasonably legible that may have to suffice.
I don't think Crystal can help you. Try looking for some kind of command-line based app on the internet which can automically resize pictures (add black space, reduce in a 1:1 ratio, etc). I'm sure they're out there.