Fix issue with exporting dimensions for images with transparent borders