b0x4it Posted January 27, 2014 Posted January 27, 2014 I am using _GDIPlus_ImageResize to resize an image, but it remove all the exif data! is there anyway to retain the metadata of an image? #include <GDIPlus.au3> Global $hBitmap, $hImage, $hImage_new, $sCLSID, $tData, $tParams _GDIPlus_StartUp() $hImage = _GDIPlus_ImageLoadFromFile("c:\CAM00879.jpg") $hImage = _GDIPlus_ImageResize($hImage, 100, 80) ;resize image _GDIPlus_ImageSaveToFile($hImage_new, "c:\AutoItImage2.jpg") _GDIPlus_ImageDispose($hImage) _GDIPlus_ShutDown()
UEZ Posted January 27, 2014 Posted January 27, 2014 That's not possible because as mentioned in your previous post the _GDIPlus_ImageResize() will create a new bitmap in the memory which is not in JPG format. You have to save all the JPG meta data create the new JPG and update the new JPG with the meta data. Btw, do not use same variable ($hImage) for different image handles! It will cause memory leaks! Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
b0x4it Posted January 27, 2014 Author Posted January 27, 2014 That's not possible because as mentioned in your previous post the _GDIPlus_ImageResize() will create a new bitmap in the memory which is not in JPG format. You have to save all the JPG meta data create the new JPG and update the new JPG with the meta data. Btw, do not use same variable ($hImage) for different image handles! It will cause memory leaks! Br, UEZ Thanks for your quick reply. Could you please give me the name of the function or method to get and set metadatas of an image? Thanks for your advice, I though it make the code faster because it does not need to allocate another portion of memory!
UEZ Posted January 27, 2014 Posted January 27, 2014 Try this here: '?do=embed' frameborder='0' data-embedContent>> Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
b0x4it Posted January 27, 2014 Author Posted January 27, 2014 Try this here: '?do=embed' frameborder='0' data-embedContent>> Br, UEZ Thanks for the link, but it doesn't have any information about shutter, iso, exposure, flash, and etc. Do you know of any third party app with command line parameters so that I can use autoit to automate this process? I know that Faststone can do this, but it doesn't have command line AFAIK. I also tried ImageMagik, but it doesn't retain the metadata!
UEZ Posted January 28, 2014 Posted January 28, 2014 I'm not working with EXIF stuff but you can try these tools: http://www.hugsan.com/exifutils/html/features.html Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now