Thursday, April 2, 2015

adobe photoshop - Is there a way to convert pixel art into vector?


I've made some high resolution pixel art in PS by drawing it down at the pixel level and then increasing the image size with the nearest neighbor setting to keep it crisp. In the web browser, however, I need to display these images as icons with a dynamic size, so I can't just size the images correctly to begin with, and the broswer seems to blur the images when rendering them smaller, while vector images seem to stay more crisp as they shrink.


So I'm wondering if there's a way to convert the pixel art neatly into vector. I'm aware of the trace function in illustrator, but it seems to do a rough job iirc.



Answer



Browser rendering


You can use the CSS property image-rendering to stop browsers from applying anti-aliasing and interpolating your image when resized. Browser support is a bit inconsistent though. Some browsers support the pixelated value while others need the crisp-edges value. Internet Explorer instead uses the non-standard -ms-interpolation-mode: nearest-neighbor and Edge apparently has no support at all. Putting it all together you'd need something along the lines of:


.icon {
image-rendering: -webkit-crisp-edges;

image-rendering: -moz-crisp-edges;
image-rendering: crisp-edges;
image-rendering: pixelated;
-ms-interpolation-mode: nearest-neighbor;
}

You can read more here: CSS-Tricks: image-rendering and see specifics on browser support at caniuse here: Can I use... Crisp edges/pixelated images.


Vector


You could use the object mosaic function in Illustrator to convert your pixel art to vectors. This will end up with a bigger file but whether that is too big depends on your requirements and the artwork itself. Take this 30 × 30 pixel smiley face I just drew:


enter image description here



This is the resulting mosiac:


enter image description here


Now, we don't need all of those individual tiles so we can merge a lot of them in to single shapes (using Pathfinder) saving on some of that increased file size. Even similarly colored tiles that aren't connected can be converted to compound paths which would save you a bit of file size. This obviously depends on the artwork itself though.


After merging some of our tiles:


enter image description here


The rusulting SVG (without any optimization) was about 10KB which, although a significant amount bigger than the 4KB the original PNG was, still isn't very big.


style - What is the correct usage of "P.S." in Emails?



I've been wondering this for a while. What is the correct usage of "P.S." in e-mails? Where should and shouldn't it be used?



Answer



P.S. in e-mails is used exactly the same as P.S. in normal letters. It is short for the Latin post scriptum, i.e. written after the main script. As such, it is written at the bottom (end) of the main script (main e-mail in this case), and generally contains information which is trivial, or tangental to what was just said. For example,



I'm starting my new job on Monday. Really looking forward to it. I'm going to be working as a clothes designer.


P.S. Do you still like making clothes?



Wednesday, April 1, 2015

symbols - How can I avoid icons with double meanings?


I am currently trying to make an icon that indicates a bike shop sells bike accessories. This icon will be displayed along with other icons, such as the bike types the shop sells and if the shop accepts cards or cash.


The accessories icon however is turning out to be quite troublesome. This is what I've tried to create and why they didn't work:


Bike lock: is confusing because it looks like the shop might be locked/closed. Colleagues also thought it meant the shops are selling bike insurance.


Bike basket looks a lot like your average shopping basket. Because the icon is very small, adding a bike steering wheel makes the basket look unrecognisable.


Bicycle pump is used by other websites to indicate a shop offers maintenance service.


Saddle Seemed like the better option but I also need an icon that indicates the shop offers test rides on bikes, and I can't think of anything else that would fit test rides.



Since none of these icons are often used, I'm afraid my target group (which consist mostly of adults 40+) won't understand what they mean because they can all mean sort of the same thing.


What is a good option to avoid icons with double meanings? Would a label (maybe hovered?) improve the user experience? Or is it generally better to stick to textual things with complex categories like these?



Answer



A rule of thumb with icons is to keep it as simple as possible.


It's important that users get the idea by the first look, not by the second and third until the 'AHA' moment occurs. In general, you don't want that. Unless you are designing puzzles.


When I think of accessories for a bike, the first thing that comes to mind is the thought:



What normally isn't on a bike by default?



Picking something that's not that far-spread might be enough to give users the right idea.



For example a bicycle bag. Essentially something that is a little more specific, so it can't be misinterpreted for something else commonly used in a more general way. Like the gear symbol for settings.


If you end up with a more generic symbol, why not add a text that says "Accessories" when the user hovers over the icon?


The purpose of icons is to give the user a logic overview that helps him quickly orientate, not a detailed description.


Malliavin Calculus


From a quant point of view, how would you explain Malliavin calculus in few words ? I have the level to take these courses, but won't be able to do it next year, so I want to know what I am missing.


What would they bring to someone who has already learned stochastic Calculus with Ito's integral?


Would they be more useful for front office or middle office?



Answer



I think this question has no easy answer but I'll give it a shot anyway (beware: oversimplification ahead!).



The main idea of the Malliavin calculus is to be able to differentiate stochastic processes like Brownian motion (or more general martingales with bounded quadratic variation), which are not differentiable in the traditional sense (because of their infinite variation).


Insofar the Malliavin calculus is the natural counterpart for stochastic differentiation to what the Ito calculus is for stochastic integration.


One of the practical application of Malliavin calculus is in the area of calculating option Greeks which makes sense since you would suspect that you needed derivatives to calculate these.


The main problem with the traditional approach is that the derivative needs to be approximated using the finite difference method and such approximations can become very rough. The integration by parts formula obtained from Malliavin calculus can transform a derivative into a weighted integral of random variables. This gives a more accurate and fast converging numerical solution than obtained by the classical method.


Some parts of the following thesis (on which parts of this answer are based too) might be helpful to dive deeper into the matter: The Malliavin calculus by Han Zhang.


To dive deeper into the practical applications (plus a primer on Malliavin calculus at the end!) can be found here: Smart Monte Carlo: Various Tricks Using Malliavin Calculus by Eric Benhamou.


Create a pencil or sketched style in photoshop for websites


I found this image on the internet: example image


I want to use this style on some icons. Is there anyone familiar with this style and do you have an advice for me?



Answer



Pull a regular icon into photoshop, then Filter -> Sketch -> Graphic Pen.


This will do your sketching look, then you probably just have to free-erase some edges, and maybe apply a light outline and you're good. Easiest way I can think of



navigation - Are there alternatives to hamburger + drawer menus?


On the internet there is a lot of bashing on the Hamburger Icon & the matching Nav Drawer.


I realize it sometimes might be a pattern which should be avoided when simpler, more explicit options are available.


However, I haven't seen proper alternatives to a large side navigation menu which wouldn't make a user like me want to uninstall the app.


I was wondering what alternatives exist as a replacement for the Navigation Drawer, for both native apps and websites.


The most common option I've seen is the tab bar which works fine with 3 or 4 items. However, we're still scrolling vertically in general to read more lines and when you have 10+ items this is going to be inconvenient.




  • Nav Drawer, 2 steps: click the icon or swipe from left to right to reveal. When revealed you should see all the available options.





  • Tab Bar, 2 steps: Swipe over the bar in hopes of finding the item you are looking for if you even know what to look for, then when found tap the item.




Also an issue in the current app I'm working on is that there are views which actually contain tab bars, up to 3 items in here which are mostly click through to the next view level.


Maybe relevant: I'm not building a simple website extension it's for communities in which people actively participate and there is a lot of depth and detail. About 8 different Modules and some custom content is available, widgetting all this in a single page/single view will be nearly impossible. This might be the reason that I'm willing to live with the Nav Drawer since it's just extremely complex in the end.


Apologies for bringing this negatively but I'd love to see other options for whatever cases, I agree that when the navigation is simple it should fit in the main view.



Answer




You point out that there is a surplus of criticism and a scarcity of alternatives to the hamburger menu.





Background


Hamburger menus have been criticized because:



  • They hide links and content from the user instead of presenting the user with direct options.

  • The hamburger icon is placed at the top of the screen where users tend to ignore it.

  • The hamburger icon is not familiar to many users (but this is changing).

  • They facilitate sloppy design because designers can pile loads of links and content carelessly into the drawer.

  • They can be hard to reach for mobile users with larger screens when they are placed on the top right or (worse) top left.

  • They test poorly in A/B and other user testing. See this article which has additional links you can follow.



Apple's UX evangelist gave a short critique of the hamburger at WWDC 2014 that is a good read.




Typical alternatives


The typical alternatives suggested for the hamburger+drawer are nav bars and tab controls. These alternatives address the issues above by reducing the number of options for the user (simplification of choice) and by making them explicit:


enter image description here




Newer alternatives


The problems with tab controls and bottom navbars, as you point out, are that they are not useful when there are a lot of options in a menu. You then have a crappy trade off around whether to overflow content or to truncate the number of options.


Design purists will scoff at not being able to reduce options, but in many applications (e.g. enterprise or technical) this is unavoidable and leads to worse UI.



Here are three alternatives to the hamburger menu which provide for larger number of menu choices (click to expand).


enter image description here




  • Bottom sheets are used in Google's Material Design UX framework as an alternative to menus. See this specification. The bottom placement of the sheet helps ergonomics with today's larger mobile screens.




  • Bottom menu bar makes the Menu option explicit because it tests better. Again, the button placement provides better ergonomics. Additionally, the placement is at the end of the top-to-bottom visual flow so users are less likely to ignore the option.





  • Floating hamburger buttons use similar layout principles as above to improve ergonomics and end-of-flow placement, but also use drop shadows, color, and grid-breaking superposition to make the menu more noticeable as a call to action.




These alternatives are not an excuse for poor design, nor should they be used when more explicit options are available. But they may help when there are too many legitimate menu options to fit into a tab control or nav bar.


publishing - How to publish public domain books?



It is known that the copyright permission is not needed for old books (usually 70 years after the author's death), because the copyright has been expired. However, I am not sure how easy a public domain book can be published.


Consider re-publishing a book by Shakespeare. Since it is in public domain, this means that any publisher can re-publish it?


And if not, who is responsible for any hidden copyright?


How to check that we can publish a title legally? and how to be sure that there is no copyright restriction for publishing it?


For recent books, we need to ask the original publisher or the author; but for the case of Shakespeare's works, many publishers have re-published it. It is the case for most of old books.




technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...