Bug 148233 - Adding texture generates black image
Summary: Adding texture generates black image
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Editor-Texture (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-26 22:05 UTC by Dik Takken
Modified: 2016-06-29 20:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dik Takken 2007-07-26 22:05:44 UTC
Version:           0.9.2 (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages
OS:                Linux

When adding a texture to an image, the image becomes black. You can see this in the preview already. At large zoom levels, the preview image contains garbage.

Also, the preview is absent until you change some settings. It all feels a bit broken to me.. :)
Comment 1 caulier.gilles 2007-07-26 22:41:48 UTC
Dik,

Not reproductible here on my computer. Sound like something is wrong in your installation. The plugin use texture PNG file like template. Perhaps file cannot be loaded by program. Are you some error messages in the console? 

Gilles Caulier
Comment 2 Gerhard Kulzer 2007-07-27 17:32:00 UTC
Am Thursday 26 July 2007 schrieb Dik Takken:
[bugs.kde.org quoted mail]

Have you beryl or compiz running? Sometimes you get black screens with them as 
you describe it. When you change the window size, the content appears again.

Gerhard
Comment 3 Dik Takken 2007-07-27 17:55:06 UTC
No compiz or beryl running. I do have the composite extension loaded (I always do) but this never gives any troubles with any other software. Also no error messages when started from console... The textures are there on the harddisk, and some of the icons / logos in the same directory are displayed just fine in DigiKam.

How can I debug this??
Comment 4 Gerhard 2007-09-04 00:27:53 UTC
Hi,
I've got exactly the same problem, but also if I want to add a frame (I suppose because it uses the same textures). I'm using Suse 10.2 on AMD 64, KDE 3.5.5. It seems that if it's an installation problem it's present on some more machines. I tried to compile myself, use the packages from Suse Build service or from packman, but always the same result: black screen. 
If I start digikam on the console, I get "QFile::open: No file name specified" loads of times, even if I don't use the texture or frame plugin. It may not be specific to this error.

regards
Gerhard
Comment 5 Diego Andino 2007-09-10 19:30:05 UTC
Well i've looked into the code and the problem seems to be here:

On imageeffect_texture.cpp:285 and imageeffect_border.cpp:647 :

    KGlobal::dirs()->addResourceType(pattern.ascii(), KGlobal::dirs()->kde_default("data") +
                                     "digikamimageplugins/data");

The textures and pattern files are installed by default on DATAROOTDIR/digikam/data so they cannot be found hence the resulting image gets corrupted because apparently theres no code for checking the paths are correct and the files are found.

i've changed the above lines to:

    KGlobal::dirs()->addResourceType(pattern.ascii(), KGlobal::dirs()->kde_default("data") +
                                     "digikam/data");

and now it works fine here.

Diego.

ps : sorry my english sucks
Comment 6 Arnd Baecker 2007-09-10 19:47:20 UTC
a) thanks a lot for looking into this - very much appreciated!
b) Gilles, would this break on your set-up?
c) could you easily provide a patch wrt to current svn?
d) your English does not suck at all - most of us
here are not native speakers either - don't worry!
Comment 7 caulier.gilles 2007-09-10 19:49:38 UTC
Arnd,

I have just forget to change "digikamimageplugins" to "digikam" everywhere. Just grep to be sure than we don't have others instance in anothers place in source code...

Gilles
Comment 8 caulier.gilles 2007-09-10 22:54:55 UTC
Dik,

All instance of "digikamimageplugins" in current implementation from svn are already fixed. 

I close this file now

Gilles
Comment 9 caulier.gilles 2007-10-08 06:25:00 UTC
*** Bug 150584 has been marked as a duplicate of this bug. ***