Is there a way to change the background color of the xcassets view in Xcode 5 or Xcode 6? - xcode

Is there a way to change the background color of the xcassets view in Xcode 5 or Xcode 6?
I have white images that are lost on the white background.
When viewing an image without using xcassets, the image is set against a grey background.
However with xcassets the background is white and the images can't be seen.
I've tried using different different font and color schemes but they only seem to apply to the text editor.

A reasonable work around is to select the image asset, (eg click on the 1x or 2x version) and then press the spacebar.
This will show the asset in a popover with a light grey background.

If you are happy to add an Xcode plugin (it's available via Alcatraz) then
TOCAssetCatalogBackground solves this problem. https://github.com/toco/TOCAssetCatalogBackground

Are the images essentially silhouettes? If so, you could make them in another color (I like to use magenta, because then it’s immediately clear when something isn’t working). Then you can use iOS 7’s -[UIImage imageWithRenderingMode:] (not sure if there is a Mac equivalent) to have the image automatically pick up the tint color of its containing view. Then you would not be looking at white images on a white background.

Related

Change Background Color of Full Screen Application- Xcode

Good Afternoon helpful people!
I'm building a mac app that displays images. The app will be in fullscreen mode 100% of the time it is running.
My issue is that the images I am displaying do not fill the entire screen, therefore, showing a grayish background. Is there anyway to change this background color to Black? Or maybe it's the NSImageView that needs the background color changed?
I do not see anywhere in my Xcode Attributes Inspector to change color.
Thanks!
The solution to this is, in my case, to add an NSBox in storyboard and set its constraints so that it ALWAYS fills the view. Once you have done this, go to the Atrributes Inspector and change its Fill Color to your desired color.
The important part here is the constraints. Set Top, Bottom, Left, and Right space to 0. Hope that makes sense, i'm new to constraints.

Firefox Addon manager blurry icons

I created an extension for Firefox and made a simple icon for it.
But when I tested it in the Addon manager the icon appeared blurry despite my source image was fine.
I started to experiment with different sizes and shapes of the icon.
Figured out that the icon container is 48x48 pixels and the default addon icon is 32x32.
But for any experiments the result was the same.
So I created a simple rectangle icon drawing it by pixels so it shouldn't blur anyway:
But the result blurred again:
There is some sub-pixels around the rectangle though the border should be crisp...
In pixels view:
Also I found the default extension icon (a puzzle piece) and in pixels it looks perfect but in the manager the borders are blurred a little though it's not obvious at first glance.
Are you sure this is not happening when you save the image? I don't know what app you are using, but many photo apps try to compress jpm images when you save them by default. Check this first.
Usually this does not happen with png images, so you could try using a png image instead as well.
It was silly enough... The broblem was the page scale not 100% on the Addons page. Pressed Ctrl+0 and all restored.
It happens sometimes on other web pages when I zoom in/out the view and images lose their sharpness.

Creating an image for a Visual Basic command button?

I'm working on an application which was made in Visual Basic 6.0. It was been made 8-10 years ago. There are different images used on the different command buttons. I have made a new image for a new button, but the image is not matched with the other images and I don't want to change all the old images.
I have used Fireworks 8.0, MS Office Picture Manager and MS Paint. However, I have failed to make the image the same as the others. I have attached a screen shot of the application. The new image is highlighted in a red rectangle. I want all the buttons to look the same. The new image looks a little blurry; also, the font is smooth, which it shouldn't be because the others aren't smooth.
I have faced similar issue. I have tested the text of the image with some of the fonts and found that MS Sans Serif was matched with font of the other images. I wrote the text in MS-Paint then copied it and paste it with icon in Fireworks 8 and made the background transparent. It worked for me. You can try it. Hope this helps!
You just have to try to make your images look like the previous images.
Try to find out which font was used. Turn off anti-aliasing in the image editor - that might be why the text looks smooth.
Perhaps you are drawing your image rather larger than the space available in the buttons, and then it is being shrunk to fit at runtime? That could make it look blurry. And have you used more colours than the other images? And more "subtle" colours, but the colours in the other images are quite brash.

How do you set pixels to be transparent in a .GIF or .PNG file in Visual Studio 2008's drawing editor?

My graphic artist gave me a .PNG file, then the same file as a .GIF. When I save it, the transparent background pixels actually get set to white pixels. At one time I thought VS could do transparent colors with this little pink/salmon retro-tv looking icon in the color palette, but it's not showing up any more.
Anybody have any ideas?
Open the file gif/png with the Visual Studio Editor
In the properties window select a format that supports the alpha channel i.e. 32bpp BGRA
Using the eraser tool now will set those pixels to transparent.
In Visual Studio 2015 image editor, I found an easy way to do this with the eraser tool.
First fill the background which you want to make transparent with an adequately unique color(not really necessary I think, after some trials.. It's up to you to try) that is not in the picture.
Then select the tool used to 'select an area of similar color'.
Then click on the background you filled with new color. Only the area you need to make transparent will be selected.
Now use the eraser tool with as much size(erase width in properties) as you want to easily erase the opaque background. The eraser won't erase the picture you need.
Then click outside the picture to clear the selection and you get the picture with the transparent background! This method just takes seconds to finish, as compared to using just the eraser tool. Just sometimes, you may need to touch up the picture, as some minor part of required image may be cleared.
NOTE: You must set the format to '32bpp BGRA' to do this.
EDIT: I found that you don't even need an eraser tool. After step 3, press delete, and the background is gone!
In the VS 2013 image editor, the following works for me:
Select View-Toolbars-Image Editor so that you can see the toolbar
Select the eraser from the toolbar. Set the erase width in the property window to 1
Now clicking ("erasing") a pixel will set it to transparent
The VS eraser tool was working but taking way too long for my image. This tool automatically made my white background transparent when I uploaded the png version.
https://www.bonanza.com/background_burner
Drag and Drop image on page (then the page does some processing to
the image)
Click green download button on bottom right and select .png
(transparent background)
Pros:
Free
Super fast
Online tool so nothing to download
Con:
Image needs to be at least 100 x 100px
I'm just using it for an intranet web app so I didn't need to put much time in or make it great quality.
In the VS2019 image editor you can also use the "M" key on the keyboard to select an area of an image based on color, and then use the delete key.
If you have access to Microsoft Visio you can Import/Create the graphic object that you want to have some transparent pixels, make some or no changes to it and then Save As Type .png file.
After you hit Save As a PNG Output Options pop-up appears.
It gives you a Tick box to select the Transparency color (ie color you want to make transparent).

Icons editable in Visual Studio, but appear blank in other editors

Odd one, this. The project I'm working on includes some small icons (.ico file type) in a Windows resource (.rc) file, all 10x10 black on transparent.
Opening these icons in Visual Studio 2010 correctly brings up the icon editor, showing the icon in salmon-pink on teal-green. The icon's properties in VS show it as "10x10, 4 bit, BMP". The app that includes the icons displays them fine.
However, I cannot view or edit them in external editors! Windows 7 explorer's thumbnail view is blank white; MS Paint also loads them as 10x10 blank white images. Paint.Net (with the .ico plugin) thinks they're 10x10 transparent images. Windows file properties reports them as 10x10, 32-bit icons.
What's going on?
An icon contains 3 distinct bitmaps. Two monochrome ones and, in your case, a 4bpp bitmap. The monochrome bitmaps determine how the pixels are displayed. One of them determines whether a pixel is transparent, it shows up as teal green in the icon editor. The other determines whether a pixel is actually the background pixel inverted, it shows up as pink salmon in the icon editor.
So if you only see teal and pink then your 4bpp bitmap does not contribute anything at all to the visible icon. Whatever other icon viewer you are using to look at the icon is tripped up by that. Which is not unusual, inverting background pixels made only sense in the early days of Windows, back when displays had a very limited number of colors. Like 4bpp.
Fix it by using real colors in the 4bpp bitmap. Or don't worry about it if you are always displaying the icon on a well known background. Which is not typical btw, the user can change the color scheme setting for the window title bar for example. Or change the wall paper image for the desktop. The resulting icon color will be pretty random.

Resources