I want to export high-resolution images of a plot I'm making. The trouble is, the plot has a lot of extra white space around it which I get rid of via ImagePad (I could also use ImageCrop but I run into the same problem described here).
If I put in the following code,
tempimage = Plot[x^2, {x, -10, 10}];
Export["testexport100.png", tempimage, ImageResolution -> 100];
Export["testexport125.png", tempimage, ImageResolution -> 125];
Export["testexport150.png", tempimage, ImageResolution -> 150];
I get three files of different size and quality (10KB, 13KB, and 16KB). But when I first adjust the margins of the image, I no longer have the ability to change the resulting image quality. For example, if I do
tempimage2 = ImagePad[tempimage, {{0, -10}, {0, -10}}];
Export["testexport2_100.png", tempimage2, ImageResolution -> 100];
Export["testexport2_125.png", tempimage2, ImageResolution -> 125];
Export["testexport2_150.png", tempimage2, ImageResolution -> 150];
Then all three resulting files are identical and 7KB.