[Digikam-devel] [Bug 233409] Image watermark in batch queue manager

Gilles Caulier caulier.gilles at gmail.com
Thu Jun 3 09:53:48 BST 2010


https://bugs.kde.org/show_bug.cgi?id=233409


Gilles Caulier <caulier.gilles at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|FIXED                       |




--- Comment #22 from Gilles Caulier <caulier gilles gmail com>  2010-06-03 10:53:45 ---
Mikkel,

I reviewed you patch and apply some minor polishing in code. I will apply it to
svn and close this file.

Next stage for you, if you is agree, is a little bit complicated but necessary
for the future. i already do it for other tools shared between editor and queue
manager. The goal is to share a classes using common implementation set in
digikam/dimg/filters. Look the status there :

http://websvn.kde.org/trunk/extragear/graphics/digikam/imageplugins/TODO?revision=1134027&view=markup

Typically, all tools from editors must be available in BQM. It's not yet case.
Image WaterMark from BQM is in fact InsertText tool from editor. Not all code
can be shared of course, because we don't have/cannot see preview of text
placement over image in BQM, but at least, the code to patch image with
inserted text can be the same.

To do that there is some factoring to do :

1/ a settings widget must be created. This one will embed common settings
available into BQM and Editor tools. This widget code must be placed there :

http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/dimg/filters/decorate/

Files must be named watermarksettings.cpp/.h

The common code to merge is defined there :
- inserttexttool.cpp#136::242
- watermarktool.cpp#131::261

2/ a new class must be created to host code used to patch the image with insert
text/image. We must use DImgThreadedFilter class as parent, to be able to use
the code in a separate thread.

http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/dimg/filters/dimgthreadedfilter.h?revision=1115803&view=markup

This class must be placed at the same place than watermarksettings class. Files
must be named watermarkfilter.cpp/.h

of course, some code must be taken and merged from :

- WaterMarkTool::toolOperation()
- InsertTextWidget::makeInsertText()

Globally, the best way to do it, is to 

- Extend your current code from WaterMark tool to include missing option to set
text, and already implemented in inserttext tool
- To rewrite Inserttext tool and factoring code using shared implementation
done with WaterMark tool.

Look also in already tools shared between editor and BQM, as BorderTool :

http://lxr.kde.org/source/extragear/graphics/digikam/libs/dimg/filters/decorate/borderfilter.h
http://lxr.kde.org/source/extragear/graphics/digikam/libs/dimg/filters/decorate/bordersettings.h
http://lxr.kde.org/source/extragear/graphics/digikam/utilities/queuemanager/basetools/decorate/border.h
http://lxr.kde.org/source/extragear/graphics/digikam/imageplugins/decorate/bordertool.h

Let's me hear if you is interested to do this job. 

Thanks in advance

Gilles Caulier

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list