Ideal Location to Store Images in Codebase?

Kartik Ramesh kartikx2000 at gmail.com
Sun Jun 28 12:09:10 BST 2020


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/a176a264cf1776105491c7883aa21ed6a1b492b1
2. Patching in parent CMakeLists:
https://invent.kde.org/graphics/digikam/-/commit/ddb133af9aaabf58a90dd5c194e145bdd6c7e6ff

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/borderpatterns/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/filters/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/digikam/sample-aix.png
> >>
> >> Code is here :
> >>
> >>
> https://invent.kde.org/graphics/digikam/-/blob/master/core/utilities/setup/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/791a5249/attachment.htm>


More information about the Digikam-devel mailing list