This depends on the image format an what exactly "resizing" means in this way. When you use the compression feature of PNG the dimensions of that image (width, height, color depth) stay the same and that process is perfectly reversible as PNG is a lossless format, the codec just tries to put as much information as possible into as less bytes as needed, this may result in higher CPU usage. Using JPEG compression you destroy image details and it's irreversible. If you change any dimension or cut something off of your image that information is lost, no matter what format you use. But for the exact details i recommend reading the specification of the image codec.