Ideal Location to Store Images in Codebase?

Maik Qualmann metzpinguin at gmail.com
Sun Jun 28 12:27:46 BST 2020


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/a176a264cf1776105491c7883aa
> 21ed6a1b492b1 2. Patching in parent CMakeLists:
> https://invent.kde.org/graphics/digikam/-/commit/ddb133af9aaabf58a90dd5c194e
> 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/borde
> > 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/filte
> > 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/digik
> > am/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






More information about the Digikam-devel mailing list