Writing webp takes huge time
Posted: 2015-02-27T15:30:15-07:00
Hi,
I am trying to compare between the timing it takes to convert(including resize) from jpeg->webp or jpeg->jpeg or webp->webp. I am doing this for jpg and webp versions of the same image.
I am using
ImageMagick version: 6.8.6-8
webp version : 0.4.2(I tried 0.4.1 too)
OS : Ubuntu
Currently through my application i am timing the operations(read,resize,write) separately:
Sample case :
convert A.jpg -resize 1200x1200 B.webp
convert A.webp -resize 1200x1200 C.webp
Sample image : https://ebay.box.com/s/rhh3t81r5lb9bzclznsircgjlqakchaj (Please let me know if that link is accessible by you). Unfortunately this forum doesnt give me option to attach files
The time to write file(Image.write) is very high as the target size grows. Many times it is more than the time it took to resize.
I did a sample study on 2000 images and result on an average is same as i described. Have you seen this kind of behaviour in any of your benchmarkings?
I have filed a similar request in the past for gif : viewtopic.php?f=1&t=24329&p=104273#p104273 because you guys suggested to use n option to optimize it. Does anything similar applies to the webp too?
Please let me know if anymore clarifications are required.
Thanks
I am trying to compare between the timing it takes to convert(including resize) from jpeg->webp or jpeg->jpeg or webp->webp. I am doing this for jpg and webp versions of the same image.
I am using
ImageMagick version: 6.8.6-8
webp version : 0.4.2(I tried 0.4.1 too)
OS : Ubuntu
Currently through my application i am timing the operations(read,resize,write) separately:
Code: Select all
timeval tim;
gettimeofday(&tim, NULL);
double t11=tim.tv_sec+(tim.tv_usec/1000000.0);
image_.resize( boost::lexical_cast<string>(context.getTargetWidth())+"x"+ boost::lexical_cast<string>(context.getTargetHeight()) + "!");
gettimeofday(&tim, NULL);
double t12=tim.tv_sec+(tim.tv_usec/1000000.0);
float tResize = (t12-t11)*1000;
Code: Select all
timeval tim1;
gettimeofday(&tim1, NULL);
double tWriteStart=tim1.tv_sec+(tim1.tv_usec/1000000.0);
image_.write(fileName_.c_str());
gettimeofday(&tim1, NULL);
double tWriteEnd=tim1.tv_sec+(tim1.tv_usec/1000000.0);
float tWriteFile = (tWriteEnd - tWriteStart)*1000;
convert A.jpg -resize 1200x1200 B.webp
convert A.webp -resize 1200x1200 C.webp
Sample image : https://ebay.box.com/s/rhh3t81r5lb9bzclznsircgjlqakchaj (Please let me know if that link is accessible by you). Unfortunately this forum doesnt give me option to attach files
The time to write file(Image.write) is very high as the target size grows. Many times it is more than the time it took to resize.
I did a sample study on 2000 images and result on an average is same as i described. Have you seen this kind of behaviour in any of your benchmarkings?
I have filed a similar request in the past for gif : viewtopic.php?f=1&t=24329&p=104273#p104273 because you guys suggested to use n option to optimize it. Does anything similar applies to the webp too?
Please let me know if anymore clarifications are required.
Thanks