Saturday, September 6, 2014

How to change icon color in Adobe Photoshop Elements

I like icons. I think icons are the most important part of design. Most of the times icons I use are one colored and I just want to change their color. The simple solution is to make selection with magic wand and fill in the required color. However, this does not preserve color variations that make icon smooth with small shadow effect. So for better effect I use layer mask to convert the color.

For example, let’s take an icon:

Because the background is one color, magic wand can remove background nicely.

The next step is to convert current color to black by selecting “Enhance” > “Remove color”, then “Enhance” > “Auto color correction”.

Because layer mask will show through the lighter colors we need to invert image to make our icon white. “Filter” > “Adjustments” > “Invert”.

You can see that the edges are darker with some gradient. This preserves the original icon shadow making it look smooth.

Then you need to create a new layer. Fill it with the desired color. And add a layer mask to the new layer.

Select the layer mask (Option+click) and fill it with the solid black color.

Select the original layer, Select All, Copy. Select the layer mask and paste copied image.

Copied white image will show through the original color.

Check out how nice edges look!

Saturday, June 7, 2014

Importing documents in iOS application

In order to import documents application in iOS should register types of documents that it can handle.

In application target under Info you need to add Document Type that application will be able to open. For example, to support opening of PDF documents NSPasteboardTypePDF should be added with the following parameters:

  • Name - NSPasteboardTypePDF
  • Type - com.adobe.pdf

The whole list of supported document types can be found here.

In additional parameters you can specify what kind of actions application will be able to perform with the document.

  • CFBundleTypeRole - Viewer
  • LSHandlerRank - Alternate

Other configuration parameters can be found here.

Once application is configured for the supported document type user will be able to select this application by choosing it in a list of applications in Open in.. dialog window of document preview.

When user selects application iOS imports file to the application sandbox and calls a method that must be defined in application AppDelegate class with imported file path. The method should be implemented to handle document after it was imported. For example, it can be saved in a specific place or information about it can saved in database.

Saturday, May 31, 2014
Every concept originates through our equating what is unequal. No leaf ever wholly equals another, and the concept “leaf” is formed through an arbitrary abstraction from these individual differences, through forgetting the distinctions; and now it gives rise to the idea that in nature there might be something besides the leaves which would be “leaf” - some kind of original form after which all leaves have been woven, marked, copied, colored, curled, and painted, but by unskilled hands, so that no copy turned out to be a correct, reliable, and faithful image of the original form. Frederich Nietzsche
Sunday, October 20, 2013
New York

New York

Thursday, September 13, 2012
hehehe

hehehe

Thursday, May 24, 2012
San Francisco! This photo I took from my friend’s terrace with Instagram. What a beautiful day it was!

San Francisco! This photo I took from my friend’s terrace with Instagram. What a beautiful day it was!

Cloud Foundry now supports npm!

Yay, the feature I was working on recently is now on Cloud Foundry! It allows to push Node.js applications with native dependencies, like bcrypt, nowjs and fibers.

http://blog.cloudfoundry.com/2012/05/24/cloud-foundry-supports-node-js-modules-with-npm/

Friday, December 23, 2011
How people view me after I say I’m Russian - Imgur

How people view me after I say I’m Russian - Imgur

Monday, May 16, 2011

Zend Certified

Recently I received my certificate after passing Zend PHP 5.3 exam. I am glad I passed it, there were some stuff I didn’t know very well about before preparation, like namespaces, late static binding, etc. The study guide that goes with exam purchase is pretty decent. I liked its minimalistic approach, so it just tells you the main points and what topics are covered on exam. All other information and detailed explanations should be looked on php.net. I got many questions about “final”, “static” keywords, object inheritance. There are many questions with code examples, where you should guess the output.

Here is a good article about what is covered on exam: http://devzone.zend.com/article/12647

Sunday, October 24, 2010

Apartment hunting

Searching for apartment in bay area. Padmapper.com helps a lot.