extragear/graphics/digikam

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

extragear/graphics/digikam

Marcel Wiesweg
SVN commit 494037 by mwiesweg:

digikam from trunk: Threaded image loading

- Fix LoadSaveThread
- Add a class DImgLoaderObserver which allows communication with the loading/saving in a different thread:
  - progress info
  - stopping hooks to abort the loading/saving process
- Add a class ManagedLoadSaveThread which manages the tasks in its queue and allows preloading.
  To achieve this, it uses the stopping capabilities in the loaders
- Added progress info and stopping to JPEG, PNG, TIFF, PNG loaders, added progress info to raw loader.
  QImage loader does not support this.
- Use new ManagedLoadSaveThread and connect progress info to histogram tab

TODO:
- add preloading to DImgInterface and thus to IE and showfoto

CCMAIL: [hidden email]




 M  +16 -15    libs/dimg/dimg.cpp  
 M  +6 -6      libs/dimg/dimg.h  
 M  +11 -0     libs/dimg/dimgloader.cpp  
 M  +5 -2      libs/dimg/dimgloader.h  
 A             libs/dimg/dimgloaderobserver.h   [License: GPL]
 M  +78 -2     libs/dimg/loaders/jpegloader.cpp  
 M  +2 -2      libs/dimg/loaders/jpegloader.h  
 M  +69 -8     libs/dimg/loaders/pngloader.cpp  
 M  +2 -2      libs/dimg/loaders/pngloader.h  
 M  +40 -16    libs/dimg/loaders/ppmloader.cpp  
 M  +2 -2      libs/dimg/loaders/ppmloader.h  
 M  +21 -4     libs/dimg/loaders/qimageloader.cpp  
 M  +2 -2      libs/dimg/loaders/qimageloader.h  
 M  +64 -28    libs/dimg/loaders/rawloader.cpp  
 M  +4 -4      libs/dimg/loaders/rawloader.h  
 M  +129 -6    libs/dimg/loaders/tiffloader.cpp  
 M  +2 -2      libs/dimg/loaders/tiffloader.h  
 M  +24 -14    libs/imageproperties/imagepropertieshistogramtab.cpp  
 M  +3 -2      libs/imageproperties/imagepropertieshistogramtab.h  
 M  +432 -28   libs/threadimageio/loadsavethread.cpp  
 M  +108 -13   libs/threadimageio/loadsavethread.h  
 M  +16 -2     libs/widgets/histogramwidget.cpp  
 M  +3 -0      libs/widgets/histogramwidget.h  
 M  +1 -1      utilities/imageeditor/canvas/dimginterface.cpp  


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: extragear/graphics/digikam

Gilles Caulier
Le Mercredi 4 Janvier 2006 00:13, Marcel Wiesweg a écrit :
> SVN commit 494037 by mwiesweg:
>
> digikam from trunk: Threaded image loading

In first, thanks to Marcel for this great job...

>
> - Fix LoadSaveThread
> - Add a class DImgLoaderObserver which allows communication with the
> loading/saving in a different thread: - progress info
>   - stopping hooks to abort the loading/saving process
> - Add a class ManagedLoadSaveThread which manages the tasks in its queue
> and allows preloading. To achieve this, it uses the stopping capabilities
> in the loaders - Added progress info and stopping to JPEG, PNG, TIFF, PNG
> loaders, added progress info to raw loader. QImage loader does not support
> this.
> - Use new ManagedLoadSaveThread and connect progress info to histogram tab
>
> TODO:
> - add preloading to DImgInterface and thus to IE and showfoto

And :
- add a progress bar in IE status bar using QWidgetStack.
- lock any IE/showofoto GUI actions during io files operations, like comments
& tags, plugins, etc... We need to talking about before.
- Close wish #116154

//-------------------------------------------------------------------

First feedback :

I suspect a thread lock conflict between histogram tab and IE...

The problem come when image histogram tab is visible on main interface and
when IE is started, especially with large files. Sometime histogram
computation faild, sometime digikam crash with an indeep glibc error. If
histogram tab from main interface isn't visible, there is no problem.

To reproduce it, select an album with a large list of big image (PNG, TIFF, or
RAW), toogle on histogram tab from main interface, select the first album
item, and launch IE. Toogle IE window always visible , reduce IE window size
to see main interface window, and change current image from current album
using IE tool bar.

I have used this album collection during my test :

http://digikam3rdparty.free.fr/Images_2_Test_DImg/

Regards
--
Gilles Caulier
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: extragear/graphics/digikam

Gilles Caulier
In reply to this post by Marcel Wiesweg
Le Mercredi 4 Janvier 2006 00:13, Marcel Wiesweg a écrit :

> SVN commit 494037 by mwiesweg:
>
> digikam from trunk: Threaded image loading
>
> - Fix LoadSaveThread
> - Add a class DImgLoaderObserver which allows communication with the
> loading/saving in a different thread: - progress info
>   - stopping hooks to abort the loading/saving process
> - Add a class ManagedLoadSaveThread which manages the tasks in its queue
> and allows preloading. To achieve this, it uses the stopping capabilities
> in the loaders - Added progress info and stopping to JPEG, PNG, TIFF, PNG
> loaders, added progress info to raw loader. QImage loader does not support
> this.
> - Use new ManagedLoadSaveThread and connect progress info to histogram tab
>
> TODO:
> - add preloading to DImgInterface and thus to IE and showfoto
>
> CCMAIL: [hidden email]
>...
>  M  +129 -6    libs/dimg/loaders/tiffloader.cpp
>  M  +2 -2      libs/dimg/loaders/tiffloader.h

Marcel, i have found a little problem with your fix in tiffloader.cpp when
image isn't in RGBA 8/16 bits. Your patch in this loader to use
observer/progress info is uncomplete (:=)))

You can reproduce easily this problem using my images available at this url :

http://digikam3rdparty.free.fr/Images_2_Test_DImg/TIFF/

Trying to get thumbnails or to load in IE 07.TIFF, 12.TIFF, or 19.TIFF
images...

Friendly
--
Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: extragear/graphics/digikam

Gilles Caulier
Le Mercredi 4 Janvier 2006 12:21, Gilles Caulier a écrit :

> Le Mercredi 4 Janvier 2006 00:13, Marcel Wiesweg a écrit :
> > SVN commit 494037 by mwiesweg:
> >
> > digikam from trunk: Threaded image loading
> >
> > - Fix LoadSaveThread
> > - Add a class DImgLoaderObserver which allows communication with the
> > loading/saving in a different thread: - progress info
> >   - stopping hooks to abort the loading/saving process
> > - Add a class ManagedLoadSaveThread which manages the tasks in its queue
> > and allows preloading. To achieve this, it uses the stopping capabilities
> > in the loaders - Added progress info and stopping to JPEG, PNG, TIFF, PNG
> > loaders, added progress info to raw loader. QImage loader does not
> > support this.
> > - Use new ManagedLoadSaveThread and connect progress info to histogram
> > tab
> >
> > TODO:
> > - add preloading to DImgInterface and thus to IE and showfoto
> >
> > CCMAIL: [hidden email]
> >...
> >  M  +129 -6    libs/dimg/loaders/tiffloader.cpp
> >  M  +2 -2      libs/dimg/loaders/tiffloader.h
>
> Marcel, i have found a little problem with your fix in tiffloader.cpp when
> image isn't in RGBA 8/16 bits. Your patch in this loader to use
> observer/progress info is uncomplete (:=)))
>
> You can reproduce easily this problem using my images available at this url
> :
>
> http://digikam3rdparty.free.fr/Images_2_Test_DImg/TIFF/
>
> Trying to get thumbnails or to load in IE 07.TIFF, 12.TIFF, or 19.TIFF
> images...
>
> Friendly

Your last commit have fixed this problem. Thanks...

--
Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: extragear/graphics/digikam

Marcel Wiesweg
In reply to this post by Gilles Caulier

>
> First feedback :
>
> I suspect a thread lock conflict between histogram tab and IE...
>
> The problem come when image histogram tab is visible on main interface and
> when IE is started, especially with large files. Sometime histogram
> computation faild, sometime digikam crash with an indeep glibc error. If
> histogram tab from main interface isn't visible, there is no problem.
>
> To reproduce it, select an album with a large list of big image (PNG, TIFF,
> or RAW), toogle on histogram tab from main interface, select the first
> album item, and launch IE. Toogle IE window always visible , reduce IE
> window size to see main interface window, and change current image from
> current album using IE tool bar.
>

I just committed one fix, but at least one remains, and while fixing this one
I noticed some more issues where I need your opinion.

1) To me it seems selecting with the mouse in the histogram widget is broken.
Initially, the whole widget is selected (drawn in black). A single click does
not deselect, but does weird things.
Is this a bug or a feature? If this is a bug, I will fix this tomorrow so that
- dragging the mouse selects a range
- single click without dragging clears selection
- initially, no selection is drawn and range is the full histogram.
I have some code for this here because I needed to disentangle this a bit
anyway because there is currently an infinite loop when the loaded image is
null (fixed, not yet committed)

2) If there are any more threading issues (The problems I fixed might have led
to what you described above), they need definitely be sorted out.
Apart from that however, I cannot accept that loading in IE takes twice as
long if the histogram tab in main view is open. I would like to add a very
simple caching mechanism so that the histogram from main window does not need
to load the image itself. I am thinking of a central place where canvas says
"I have loaded this image right now", then sends its signals, the main view
histogram copies the image, and then canvas will withdraw its image data
again.
Is that okay with you?

Marcel

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: extragear/graphics/digikam

Gilles Caulier
Le Samedi 7 Janvier 2006 00:14, Marcel Wiesweg a écrit :

> > First feedback :
> >
> > I suspect a thread lock conflict between histogram tab and IE...
> >
> > The problem come when image histogram tab is visible on main interface
> > and when IE is started, especially with large files. Sometime histogram
> > computation faild, sometime digikam crash with an indeep glibc error. If
> > histogram tab from main interface isn't visible, there is no problem.
> >
> > To reproduce it, select an album with a large list of big image (PNG,
> > TIFF, or RAW), toogle on histogram tab from main interface, select the
> > first album item, and launch IE. Toogle IE window always visible , reduce
> > IE window size to see main interface window, and change current image
> > from current album using IE tool bar.
>
> I just committed one fix, but at least one remains, and while fixing this
> one I noticed some more issues where I need your opinion.
>
> 1) To me it seems selecting with the mouse in the histogram widget is
> broken. Initially, the whole widget is selected (drawn in black). A single
> click does not deselect, but does weird things.
> Is this a bug or a feature?

A bug, since histogram widget support 16 bits image. This bug is already in my
TODO list. I have hacked a little this part and i have identified that there
is a signal/slot problem between hiwtogram widget and color side bar tab.

> If this is a bug, I will fix this tomorrow so
> that - dragging the mouse selects a range
> - single click without dragging clears selection
> - initially, no selection is drawn and range is the full histogram.
> I have some code for this here because I needed to disentangle this a bit
> anyway because there is currently an infinite loop when the loaded image is
> null (fixed, not yet committed)

ok. You can do it.

>
> 2) If there are any more threading issues (The problems I fixed might have
> led to what you described above), they need definitely be sorted out.
> Apart from that however, I cannot accept that loading in IE takes twice as
> long if the histogram tab in main view is open. I would like to add a very
> simple caching mechanism so that the histogram from main window does not
> need to load the image itself. I am thinking of a central place where
> canvas says "I have loaded this image right now", then sends its signals,
> the main view histogram copies the image, and then canvas will withdraw its
> image data again.
> Is that okay with you?

hum, i think that IE must always in hight priority to load an image. if
histogram widget currently load image data and user want open an image in IE,
this last one must pausing histogramwidget image loading...

Caching mecanism is a good way too. It's used in imlib2 implementation...

Gilles

>
> Marcel

--
Gilles Caulier
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel