Given a sprite, for example, StackOverflow sprite and CSS attributes such as:
background-position: 0px 0px;
width: 250px;
height: 61px;
I am able to crop the logo of the sprite with Chunky PNG library. However, some sites, have negative background-position, such as for example this site: ccs - Which sprite is http://shop.ccs.com/ns/images/ccs-sprite-master-v4.png and have the following CSS attributes for the logo:
background-position: -300px -100px;
width: 166px;
height: 80x;
Since in my crop method I need to pass a starting (x,y) coordinate and ending (x,y) coordinate, I fail to see how can I translate those negatives value to something the method crop can understand. How can I do that?