Bug 213188

Summary: BQM convert to png: setting the "PNG compression" has no impact
Product: [Applications] digikam Reporter: Bartek Pietrasiak <pietras.sp>
Component: Plugin-Bqm-ConvertAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, marcel.wiesweg
Priority: NOR    
Version: 1.0.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 1.0.0
Sentry Crash Report:
Attachments: The test jpg

Description Bartek Pietrasiak 2009-11-05 02:26:53 UTC
Version:           1.0.0-beta6 (rev.: 1044916) (using 4.3.2 (KDE 4.3.2), 4.3.2-4.fc11 Fedora)
Compiler:          gcc
OS:                Linux (i686) release 2.6.30.9-90.fc11.i686.PAE

I've tried a few times with using 1 and 9. The produced png was always 3,5 mb  (on file system ;).
Comment 1 Bartek Pietrasiak 2009-11-05 02:37:46 UTC
Created attachment 38098 [details]
The test jpg
Comment 2 caulier.gilles 2009-11-05 11:00:42 UTC
Just tested. i confirm this one for BQM...

Gilles Caulier
Comment 3 caulier.gilles 2009-11-05 15:02:55 UTC
PNG compression level at 1 :

digikam(28001)/digikam (core) Digikam::QueueMgrWindow::checkTargetAlbum: Target album for queue  "#1"  is:  "/mnt/data/photos/test/212188/"
digikam(28001)/digikam (core) Digikam::ActionThread::run: Tool Index:  1
digikam(28001)/digikam (core) Digikam::BatchTool::setOutputUrlFromInputUrl: path:  "/mnt/data/photos/test/212188//.1257429505-213188.jpg"
digikam(28001)/digikam (core) Digikam::BatchTool::apply: Tool:        "Convert To PNG"
digikam(28001)/digikam (core) Digikam::BatchTool::apply: Input url:   KUrl("file:///mnt/data/photos/test/212188/213188.jpg")
digikam(28001)/digikam (core) Digikam::BatchTool::apply: Output url:  KUrl("file:///mnt/data/photos/test/212188/.1257429505-213188.jpg.png")
digikam(28001)/digikam (core) Digikam::BatchTool::apply: Settings:
digikam(28001)/digikam (core) Digikam::BatchTool::apply:     "Quality" :  QVariant(int, 1)
digikam(28001)/digikam (core) Digikam::DImg::load: "/mnt/data/photos/test/212188/213188.jpg"  : JPEG file identified
digikam(28001)/KEXIV2 KExiv2Iface::KExiv2::setImagePreview: JPEG image preview size: ( 1280  x  852 ) pixels -  141370  bytes
digikam(28001)/KEXIV2 KExiv2Iface::KExiv2::setImageOrientation: Exif.Image.Orientation tag set to:  1
digikam(28001)/digikam (core) Digikam::PNGLoader::save: PNG compression level:  9
digikam(28001)/digikam (core) Digikam::PNGLoader::writeRawProfile: Writing Raw profile: type= exif , length= 4776
digikam(28001)/digikam (core) Digikam::PNGLoader::writeRawProfile: Writing Raw profile: type= iptc , length= 141480
digikam(28001)/digikam (core) Digikam::PNGLoader::writeRawProfile: Writing Raw profile: type= xmp , length= 4217
digikam(28001)/digikam (core) Digikam::AlbumManager::slotDirWatchDirty: KDirWatch detected change at "/mnt/data/photos/test/212188"
digikam(28001)/digikam (core) Digikam::AlbumManager::slotDirWatchDirty: KDirWatch detected change at "/mnt/data/photos"
digikam(28001)/KEXIV2 KExiv2Iface::KExiv2::save: File Extension:  "png"  is supported for writing mode
digikam(28001)/digikam (core) Digikam::AlbumManager::slotDirWatchDirty: KDirWatch detected change at "/mnt/data/photos/test/212188"
digikam(28001)/digikam (core) Digikam::DImg::load: "/mnt/data/photos/test/212188/213188-1.png"  : PNG file identified
digikam(28001)/digikam (core) Digikam::ImageScanner::addImage: Adding new item "/mnt/data/photos/test/212188/213188-1.png"
digikam(28001)/digikam (core) Digikam::ScanControllerLoadingCacheFileWatch::slotImageChanged: 2894 "/mnt/data/photos/test/212188/213188-1.png"
digikam(28001)/digikam (core) Digikam::ImageScanner::scanFromIdenticalFile: Recognized "/mnt/data/photos/test/212188/213188-1.png" as identical to item 2892
digikam(28001)/digikam (core) Digikam::ThumbnailCreator::loadImagePreview: Use Exif/IPTC preview extraction. Size of image:  1280 x 852
digikam(28001)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation => Exif.Image.Orientation =>  1
timeChanged
Comment 4 caulier.gilles 2009-11-05 15:05:17 UTC
PNG compression level at 9 :

digikam(28001)/digikam (core) Digikam::QueueMgrWindow::checkTargetAlbum: Target album for queue  "#2"  is:  "/mnt/data/photos/test/212188/"
digikam(28001)/digikam (core) Digikam::ActionThread::run: Tool Index:  1
digikam(28001)/digikam (core) Digikam::BatchTool::setOutputUrlFromInputUrl: path:  "/mnt/data/photos/test/212188//.1257429684-213188.jpg"
digikam(28001)/digikam (core) Digikam::BatchTool::apply: Tool:        "Convert To PNG"
digikam(28001)/digikam (core) Digikam::BatchTool::apply: Input url:   KUrl("file:///mnt/data/photos/test/212188/213188.jpg")
digikam(28001)/digikam (core) Digikam::BatchTool::apply: Output url:  KUrl("file:///mnt/data/photos/test/212188/.1257429684-213188.jpg.png")
digikam(28001)/digikam (core) Digikam::BatchTool::apply: Settings:
digikam(28001)/digikam (core) Digikam::BatchTool::apply:     "Quality" :  QVariant(int, 9)
digikam(28001)/digikam (core) Digikam::DImg::load: "/mnt/data/photos/test/212188/213188.jpg"  : JPEG file identified
digikam(28001)/KEXIV2 KExiv2Iface::KExiv2::setImagePreview: JPEG image preview size: ( 1280  x  852 ) pixels -  141370  bytes
digikam(28001)/KEXIV2 KExiv2Iface::KExiv2::setImageOrientation: Exif.Image.Orientation tag set to:  1
digikam(28001)/digikam (core) Digikam::PNGLoader::save: PNG compression level:  9
digikam(28001)/digikam (core) Digikam::PNGLoader::writeRawProfile: Writing Raw profile: type= exif , length= 4776
digikam(28001)/digikam (core) Digikam::PNGLoader::writeRawProfile: Writing Raw profile: type= iptc , length= 141480
digikam(28001)/digikam (core) Digikam::PNGLoader::writeRawProfile: Writing Raw profile: type= xmp , length= 4217
digikam(28001)/digikam (core) Digikam::AlbumManager::slotDirWatchDirty: KDirWatch detected change at "/mnt/data/photos/test/212188"
digikam(28001)/KEXIV2 KExiv2Iface::KExiv2::save: File Extension:  "png"  is supported for writing mode
digikam(28001)/digikam (core) Digikam::AlbumManager::slotDirWatchDirty: KDirWatch detected change at "/mnt/data/photos/test/212188"
digikam(28001)/digikam (core) Digikam::DImg::load: "/mnt/data/photos/test/212188/213188-9.png"  : PNG file identified
digikam(28001)/digikam (core) Digikam::ImageScanner::addImage: Adding new item "/mnt/data/photos/test/212188/213188-9.png"
digikam(28001)/digikam (core) Digikam::ImageScanner::scanFromIdenticalFile: Recognized "/mnt/data/photos/test/212188/213188-9.png" as identical to item 2894
digikam(28001)/digikam (core) Digikam::ScanControllerLoadingCacheFileWatch::slotImageChanged: 2895 "/mnt/data/photos/test/212188/213188-9.png"
digikam(28001)/digikam (core) Digikam::ThumbnailCreator::loadImagePreview: Use Exif/IPTC preview extraction. Size of image:  1280 x 852
digikam(28001)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation => Exif.Image.Orientation =>  1

Why DImg PNG compression value passed to libpng still to 9 each time, but only fropm BQM. Form editor, no problem...

Gilles
Comment 5 caulier.gilles 2009-11-05 15:13:24 UTC
digikam(29499)/digikam (core) Digikam::BatchTool::apply:     "Quality" :  QVariant(int, 1)
digikam(29499)/digikam (core) Digikam::PNGLoader::save: DImg quality level:  1
digikam(29499)/digikam (core) Digikam::PNGLoader::save: PNG compression level:  9

...

digikam(29499)/digikam (core) Digikam::BatchTool::apply:     "Quality" :  QVariant(int, 9)
digikam(29499)/digikam (core) Digikam::PNGLoader::save: DImg quality level:  9
digikam(29499)/digikam (core) Digikam::PNGLoader::save: PNG compression level:  9

Gilles
Comment 6 caulier.gilles 2009-11-05 16:37:27 UTC
SVN commit 1045246 by cgilles:

format compression level for JPEG and PNG batch tool properly.
BUGS: 213188


 M  +2 -0      libs/dimg/loaders/pngloader.cpp  
 M  +5 -1      utilities/queuemanager/basetools/convert/convert2jpeg.cpp  
 M  +5 -1      utilities/queuemanager/basetools/convert/convert2png.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1045246