Photoshop CS6: Small Image Floating At Top-Left of Primary Image Window - image

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.

Related

Gimp Script-Fu: Delete a selection

I'm trying to write a script for Gimp that will crop an image, make a circular selection of what's left, invert the selection, and then delete the selection. I have the cropping, selection, and inversion part done, but the deleting is what's getting me.
(removed old code, see update)
That's the code I have. What's confusing me about the gimp-item-delete code is the item. I understand that I need to define my current selection as the item, but I'm not sure how to do this. If someone could explain how to do this, I would greatly appreciate it! Alternatively, if there's an easier way to do what I'm trying to do (but preferably still in a script), please let me know what you think. My knowledge of this coding is pretty limited, so simple explanations are appreciated.
UPDATE/EDIT:
Here's the (full) updated code:
; XML2 Conversation Portrait Preview Crop
(define (script-fu-xml2-convo-preview image layer)
(gimp-image-undo-group-start image)
(gimp-selection-none image)
(gimp-image-resize image 152 152 -280 -496)
(gimp-layer-resize-to-image-size layer)
(gimp-image-select-ellipse image 0 0 0 152 152)
(gimp-selection-invert image)
(gimp-displays-flush)
(gimp-drawable-edit-clear layer)
(gimp-selection-none image)
(gimp-image-undo-group-end image)
)
; populate script registration information
(script-fu-register
"script-fu-xml2-convo-preview"
"XML2 Conversation Portrait Preview Crop"
"Crops the preview window for XML2 conversation portraits."
"BaconWizard17"
"BaconWizard17"
"September 2021"
"*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Layer" 0
)
; register the script within gimp menu
(script-fu-menu-register "script-fu-xml2-convo-preview" "<Image>/Marvel Mods/Skin Previews/XML2 PC")
So when I'm running this script, it appears to just crop it and doesn't delete the inverted circular selection. However, if I interact with the image in any way (click on it, duplicated it, copy/paste it, undo/redo), it will correct itself and show the properly cropped image with the deleted circular corners. When I first run the script, it also shows the incorrect image up at the top where you can pick which image you're working on, but after interacting with the image it will show the correct image. Here's an example:
The starting image that I create from the clipboard with Ctrl+Shift+V (after screenshotting it from the game using PrtScr):
Then, I run the script, which results in this:
At the top of the screen, the image shows up like this (which is the top left 152x152 pixels of the starting image:
How the image looks once I interact with it in any way (clicking on it, copy/pasting it, duplicating it, undoing/redoing the operation):
The thumbnail at the top of the screen after I interact with the image:
Maybe it's getting hung up on something during the operation? I'm not sure. I understand if this issue is unavoidable, but I would prefer to be able to just run the script and move on rather than having to interact with the image to get it to show up correctly. The image does have an alpha layer when it's pasted in.
gimp-item-delete is a memory/object management thing and is rarely used. What you are looking for is gimp-drawable-edit-clear.
Note that it should be done (together with your final gimp-selection-none) before gimp-image-undo-group-end if you want your whole script to be undone by a single Ctrl-Z.
Edit: It appears that your code works, it's just that the display isn't updated to show the result, which is exactly what gimp-display-flush is meant to do, so why is your code calling it before gimp-drawable-edit-clear? gimp-display-flush ought to be about the last thing done by your script.

Icons in setting menu may have unexpected vertical lines

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.

Unexpected ambiguity in image aspect-ratio

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.

Find logo in desktop screenshot

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.

Mirroring a portion of the screen to an external display (in OSX)

I would like to write a program that can mirror a portion of the main display into a new window. Ideally this new window could then be displayed on an external monitor. I have seen this uiltity for a flightsim that does this on a pc (a multifunction display extractor).
CLick here for a screenshot of the program (MFD Extractor)
This would be a live window ie. constantaly updated video display not just a static graphic.
I have looked at screen magnifiers or vnc clients for ideas but I think I need to write something from scratch. I have tried to do some reading on osx programing but where do I start in terms of gaining access to the display? I somehow need to extract the graphics from a particular program. Is it best to go near the final output stage (the individual pixels sent to the display) or somewhere nearer the window management stage.
Any ideas or pointers would be much appreciated. I just need somewhere to start from.
Regards,
There are a few ways to do this:
Quartz Display Services will let you get access to the video memory for a screen.
Quartz Window Services (a.k.a. CGWindow) will let you create an image of everything that lies below a window. If you create a borderless, transparent, empty, high-level window whose frame occupies an entire screen, everything below it will be everything on that screen. (Of course, you could create a smaller window in order to copy a section of the screen.)
There's also a way to do it using OpenGL that I never fully understood. That technique is demonstrated by a couple of code samples, OpenGLScreenSnapshot and OpenGLCaptureToMovie. It's more or less obsoleted by CGWindow, though.
Each of those will get you an image that you can then show or write to a file or something.
To show an image, use NSImageView or IKImageView. If you want to magnify it, IKImageView has a zoomFactor property, but if you want nearest-neighbor scaling (like Pixie, DigitalColor Meter, or xScope), I think you'll need to write a custom view for that (but even that isn't all that hard).

Resources