How to save photoshop pixel art - format

I'm having some troubles right now with isometric pixel art. So I'm drawing this picture that is going to be uploaded later in the game, but when I save it and zoom it looks like this:
The picture became blurred and colors are not that bright. Is there anything I could do about it? How can I save it so it will be the same as in the photoshop (300% zoom)?
Would be really grateful for any help.

As Phlume said, you can use Vector base software like illustrator, CorelDraw, Inkscape (freeware) etc. and export it as a SVG image.
OR
for a quick fix, in a Photoshop you can create image in a 300% size (canvas size 3 times then require ) and export image in 96dpi. And further to reduce the image size for faster loading you can try https://tinypng.com/
And by the coding you can resize it to required size.

Photoshop is a raster based program. To retain the clarity of the pixel artwork you should switch to a vector bed program such as illustrator. When you zoom in with illustrator the math recalculate to form clean lines from point to point. The blurry you see in photoshop is a product of the pixel data becoming compressed upon saving and finding a "happy medium" to represent the color within that region.

Related

How to show image in a circle shape using C++ builder?

I just want to show images in circle shapes (I use XE8). I tried TCircle. But the only problem I am facing at now is
*) I am having graphics issue (edges are not smooth as it should be), specially when I make the size of TCircle 200px or more.
If I show an already cropped image (in circle shape), it looks much smoother. So I thought, it would be a good idea to crop an image first, then save it as as png image, and then show it on a TImage. If I get solution on TCircle it would be much easier for me, than croping an image. I would appreciate any kind of help or suggestion.

Saving a MATLAB surface object as an image

I can generate a MATLAB surface object (using h=pcolor(X,Y,C)) and I would like to save just that surface object in an image format (png, tiff, ...) without any visible background.
The surface is elliptical and not rectangular so I want to see just the ellipse, without white background, axes, labels, ticks, frame, menus, etc.
I want to use it as an overlay on Google Earth so the entity may be rectangular, as long as the parts outside the ellipse are transparent.
MATLAB and its user community seem to offer a number of ways to save images but I have not yet found one that saves just the surface object. Any solutions or even suggestions would be appreciated.
You can use export_fig tool from the matlab's FEX (www) to export the figure with a transparent background (not all the image formats are supported).
To get rid of the axes and just plot the surface, you can do
set(gca,'Visible','off')

Matlab GUIDE blurs image?

my plan is implementing an image in a Matlab GUIDE figure. Somehow the output is always blurred (see screenshot). On the left you can see the image in Photoshop on the right in Matlab - notice how the font and other parts become blurred.
I experimented with JPEG and PNG file formats (no compression), I also tried various pixel sizes(resolutions smaller, same and bigger as the actual position of the image) and DPI(values between 30-300) settings, because I expected some scaling issue. Somehow I am stuck - Looking forward to your input!
Thank you,
Florian
Screenshot of the issue: http://s1.bild.me/bilder/260513/6875414Screen_Shot_2014-06-29_at_23.19.34.png
Most probably the reason for the blur is interpolation.
If the axis size you allocated for the image is different from the size of the image MATLAB will resize the image to occupy the whole area.
In order to prevent any interpolation you must set the axis dimension to be the image dimension.

Inserting Images on the Custom UI Editor

I'm using the custom UI editor to upload images to a custom ribbon tab. I need the images to look like this:
but currently they are looking like this:
These images are directly from Microsoft shapes. I tried saving them the shapes directly but they were really messy. There must be a way to get the shapes perfect as per the first image - I'm just not sure how.
Any help would be appreciated.
Your images need to be saved in exactly 16x16 pixel size. Anything else, and they will be scaled to fit a 16x16 area, and thus have fuzzy lines.
Your top image (the rectangle) measures 16 pixels wide by 10 pixels tall. If that is the extent of that image, then when you import it, it will get stretched. You need to also include the white (or empty) space around the image (in this case, above and below) when you create the image.
The example above shows the exact same 16x10 px rectangle, in two different formats. The top image included the white space above and below the rectangle and was saved as a 16x16 px image. The bottom image only had the 16x10 px rectangle and was saved as a 16x10 px image, so it was stretched by the UI editor to fit the 16x16 available space.

Edge Detection and transparency

Using images of articles of clothing taken against a consistent background, I would like to make all pixels in the image transparent except for the clothing. What is the best way to go about this? I have researched the algorithms that are common for this and the open source library opencv. Aside from rolling my own or using opencv is there an easy way to do this? I am open to any language or platform.
Thanks
If your background is consistend in an image but inconsistent across images it could get tricky, but here is what I would do:
Separate the image into some intensity/colour form such as YUV or Lab.
Make a histogram over the colour part. Find the most occuring colour, this is (most likely) your background (update) maybe a better trick here would be to find the most occuring colour of all pixels within one or two pixels from the edge of the image.
Starting from the eddges of the image, set all pixels that have that colour and are connected to the edge through pixels of that colour to transparent.
The edge of the piece of clothing is now going to look a bit ugly because it consist of pixels that gain their colour from both the background and the piece of clothing. To combat this you need to do a bit more work:
Find the edge of the piece of clothing through some edge detection mechanism.
Replace the colour of the edge pixels with a blend of the colour just "inside" the edge pixel (i.e. the colour of the clothing in that region) and transparent (if your output image format supports that).
If you want to get really fancy, you increase the transparency depending on how much "like" the background colour the colour of that pixel is.
Basically, find the color of the background and subtract it, but I guess you knew this. It's a little tricky to do this all automatically, but it seems possible.
First, take a look at blob detection with OpenCV and see if this is basically done for you.
To do it yourself:
find the background: There are several options. Probably easiest is to histogram the image, and the large number of pixels with similar values are the background, and if there are two large collections, the background will be the one with a big hole in the middle. Another approach is to take a band around the perimeter as the background color, but this seems inferior as, for example, reflection from a flash could dramatically brighten more centrally located background pixels.
remove the background: a first take at this would be to threshold the image based on the background color, and then run the "open" or "close" algorithms on this, and then use this as a mask to select your clothing article. (The point of open/close is to not remove small background colored items on the clothing, like black buttons on a white blouse, or, say, bright reflections on black clothing.)
OpenCV is a good tool for this.
The trickiest part of this will probably be at the shadow around the object (e.g. a black jacket on a white background will have a continuous gray shadow at some of the edges and where to make this cut?), but if you get this far, post another question.
if you know the exact color intensity of the background and it will never change and the articles of clothing will never coincide with this color, then this is a simple application of background subtraction, that is everything that is not a particular color intensity is considered an "on" pixel, one of interest. You can then use connected component labeling (http://en.wikipedia.org/wiki/Connected_Component_Labeling) to figure out seperate groupings of objects.
for a color image, with the same background on every pictures:
convert your image to HSV or HSL
determine the Hue value of the background (+/-10): do this step once, using photoshop for example, then use the same value on all your pictures.
perform a color threshold: on the hue channel exclude the hue of the background ([0,hue[ + ]hue, 255] typically), for all other channels include the whole value range (0 to 255 typically). this will select pixels which are NOT the background.
perform a "fill holes" operation (normally found along blob analysis or labelling functions) to complete the part of the clothes which may have been of the same color than the background.
now you have an image which is a "mask" of the clothes: non-zero pixels represents the clothes, 0 pixels represents the background.
this step of the processing depends on how you want to make pixels transparent: typically, if you save your image as PNG with an alpha (transparency) channel, use a logical AND (also called "masking") operation between the alpha channel of the original image and the mask build in the previous step.
voilĂ , the background disappeared, save the resulting image.

Resources