Ideal Location to Store Images in Codebase?

Thanh Trung Dinh dinhthanhtrung1996 at gmail.com
Sun Jun 28 12:41:12 BST 2020


Hi Kartikx,

I've just pulled the repo and test. For me, you have some typo errors and
fixing those make it work as you want.
When you look in the cmakelists.txt you wrote in your facehelpdlg folder,
you wrongly named workOnAllCoresImg.png with workOnAllCores.png. In
addition, when you invoked, you wrongly named overlayImg.png with
OverlayImg.png

Hope that it helps you save some of your time.

On Sun, Jun 28, 2020, 13:36 Maik Qualmann <metzpinguin at gmail.com> wrote:

> A subdirectory "facehelpdlg" would be clearer, however. I don't see a
> mistake
> without trying it. Treat CMakeList.txt once with touch.
>
> Maik
>
> Am Sonntag, 28. Juni 2020, 13:27:46 CEST schrieben Sie:
> > Hi Kartik,
> >
> > Copy your images to "core/data/pics/digikam/" and they will be installed
> > automatically. Touch the existing CMakeList.txt so that the build system
> > recognizes a change. You don't need your CMakeList.txt file.
> >
> > Maik
> >
> > Am Sonntag, 28. Juni 2020, 13:09:10 CEST schrieb Kartik Ramesh:
> > > Thanks for the response.
> > >
> > > Yes, I did make changes to both those CMake files. I've pushed to my
> repo
> > > as well:
> > > 1. Creating the subdirectory and subdirectory CMakeLists:
> > >
> https://invent.kde.org/graphics/digikam/-/commit/a176a264cf1776105491c7883
> > > aa 21ed6a1b492b1 2. Patching in parent CMakeLists:
> > >
> https://invent.kde.org/graphics/digikam/-/commit/ddb133af9aaabf58a90dd5c19
> > > 4e 145bdd6c7e6ff
> > >
> > > Then I run make in core/app followed by sudo make install just to be
> sure.
> > >
> > > I'm invoking my image as:
> > > QPixmap(QStandardPaths::locate(QStandardPaths::GenericDataLocation,
> > > QLatin1String("digikam/data/overlayImg.png")));
> > >
> > > After doing this, my image does not show up in /usr/share/digikam/data,
> > > where all the other images are present.
> > >
> > > Thanks again
> > > Kartik
> > >
> > > On Sun, Jun 28, 2020 at 3:21 PM Gilles Caulier <
> caulier.gilles at gmail.com>
> > >
> > > wrote:
> > > > Hi,
> > > >
> > > > If you store your image in a dedicated folder in core/data/pics/,
> with
> > > > a relevant CMakeLists.txt script inside, did you patch also the
> parent
> > > > core/data/pics/CMakeLists.txt file to include your directory while
> > > > configuring and installing ?
> > > >
> > > > Best
> > > >
> > > > Gilles Caulier
> > > >
> > > > Le dim. 28 juin 2020 à 10:16, Kartik Ramesh <kartikx2000 at gmail.com>
> a
> > > >
> > > > écrit :
> > > > > Hi Gilles,
> > > > >
> > > > > I've followed your instructions, and wrote a similar script for my
> own
> > > >
> > > > subdirectory.  However, the images I've added don't seem to show up
> in
> > > > the
> > > > Data Install directory. For my setup, the  images get installed in
> > > > /usr/share/digikam/data. This folder contains images such as
> > > > "sample-aix",
> > > > but my images don't show up here.
> > > >
> > > > > After writing the CMake scripts, I'm doing a make followed by make
> > > >
> > > > install. I think I'm missing some step.
> > > >
> > > > > Thanks
> > > > > Kartik
> > > > >
> > > > > On Sat, Jun 27, 2020 at 1:17 PM Gilles Caulier
> > > > > <caulier.gilles at gmail.com>
> > > >
> > > > wrote:
> > > > >> Hi Kartik,
> > > > >>
> > > > >> Data as embedded images are located in core/data/pics/ directory.
> > > > >>
> > > > >>
> https://invent.kde.org/graphics/digikam/-/tree/master/core/data/pics
> > > > >>
> > > > >> You can create a new subdir for your images and install files on
> your
> > > >
> > > > >> system using cmake rules like this one :
> > > >
> https://invent.kde.org/graphics/digikam/-/blob/master/core/data/pics/bor
> > > > de
> > > > rpatterns/CMakeLists.txt>
> > > >
> > > > >> To load this image on demand in your dialog, this look simple like
> > > >
> > > > >> this using QStandardPaths::locate :
> > > >
> https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/dimg/fil
> > > > te
> > > > rs/decorate/bordersettings.cpp#L546>
> > > >
> > > > >> In Setup editor page, i embedded a photo to illustrate the
> over/under
> > > > >> exposure effect settings.
> > > >
> > > > >> Photo is here :
> > > >
> https://invent.kde.org/graphics/digikam/-/blob/master/core/data/pics/dig
> > > > ik
> > > > am/sample-aix.png>
> > > >
> > > > >> Code is here :
> > > >
> https://invent.kde.org/graphics/digikam/-/blob/master/core/utilities/set
> > > > up
> > > > /editor/setupeditoriface.cpp#L203>
> > > >
> > > > >> Best
> > > > >>
> > > > >> Gilles Caulier
> > > > >>
> > > > >> Le sam. 27 juin 2020 à 08:29, Kartik Ramesh <
> kartikx2000 at gmail.com> a
> > > >
> > > > écrit :
> > > > >> > Hello all,
> > > > >> >
> > > > >> > I am working on a help-box for users to help with using the Face
> > > >
> > > > Management Workflow. I have created a dialog-box which contains
> images.
> > > > Currently, I'm using images on my local machine, so I can use
> absolute
> > > > paths. What is the correct location in the code directory, where I
> > > > should
> > > > store these images?
> > > >
> > > > >> > Thanks
> > > > >> > Kartik
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20200628/47077a49/attachment-0001.htm>


More information about the Digikam-devel mailing list