Rotated texture width/height messup

@NathanSweet 
For rotated images (when rotate is set to true) the unpacking is working wrong, when image is 90 rotated, height is width, and width is height...
as well as transform.translate was offsetting image to the right. 
This changes fix the problem (tested)