This project has moved and is read-only. For the latest updates, please go here.

How to improve the performance of Image conversion

Mar 1 at 6:38 AM
It takes huge time to convert and resize the images. Approximately it takes around 48 seconds to convert 6 images. I have attached the code I use and the sample images with the project link below:

https://github.com/cssriraman/ConvertImages

Please let me know how to improve the performance of the code.

Also I tried converting images using multi threads. Most of the time it fails to create the images correctly.

Please check.
Mar 1 at 8:47 AM
EMF images are vector images so that is why you need to set the density to get a high quality image. But with the EMF format there is an extra feature. You can set the width and height to the desired size. The only issue with that is that you will get a better quality image when you set it to a bigger size and resize it afterwards. I gave it a couple tries and with a magnification of 3 I would get almost the same image as when you use 600 DPI. But it created the output images 10 times faster. You might need to increase that value for your other images. I had no issues when doing this multi threaded.

I have created a pull request with these changes: https://github.com/cssriraman/ConvertImages/pull/1
Mar 1 at 10:46 AM
Edited Mar 1 at 10:47 AM
dlemstra wrote:
EMF images are vector images so that is why you need to set the density to get a high quality image. But with the EMF format there is an extra feature. You can set the width and height to the desired size. The only issue with that is that you will get a better quality image when you set it to a bigger size and resize it afterwards. I gave it a couple tries and with a magnification of 3 I would get almost the same image as when you use 600 DPI. But it created the output images 10 times faster. You might need to increase that value for your other images. I had no issues when doing this multi threaded.

I have created a pull request with these changes: https://github.com/cssriraman/ConvertImages/pull/1
Thanks. It works good now. :)