This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Dolphin will not preview jpg image files [SOLVED]

Tags: None
(comma "," separated)
wes33
Registered Member
Posts
103
Karma
1
That is, dolphin won't preview above a certain size

BUT, in kde 4.10.0 and dolphin 2.2 there is no option (that
I can find) to increase the file preview size (there is
for *remote* files)

So, how can I get dolphin to preview large image
files?

Last edited by wes33 on Tue Mar 05, 2013 3:33 pm, edited 1 time in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Can you give some example sizes of these files?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
wes33
Registered Member
Posts
103
Karma
1
these are photographs; the smallest is 7.1 MB and they range up from there
to about 15MB

I would nonetheless still like to preview them so I need to know where the
setting is for users to increase file size for previews
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
If you run the following command, is the image preview displayed?
Code: Select all
okular thumbnail://<absolute path>

Example:
Code: Select all
okular thumbnail:///home/ben/Documents/Pictures/IMG_0428.JPG


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
wes33
Registered Member
Posts
103
Karma
1
thanks v. much for the suggestion; it is interesting that the
okular thumbnail command fails, with this message:


Could not open thumbnail:/home/user/Pictures/21 feb 2013/IMG_0098.JPG.
Reason: The process for the thumbnail protocol died unexpectedly
User avatar
Peter Penz
Registered Member
Posts
11
Karma
0
The option to specify a maximum file size for local previews has been removed from Dolphin, as it did not make any sense: The time to generate a preview does not necessarily depend on the file size. E.g. for a preview of a video only one frame at the start of the file can be considered, which would be quite fast even if the video has a size of 1 GB. Also e.g. JPEG allows to embed previews so that even for very huge JPEGs a preview can be generated very fast.

So Dolphin does not specify any limit at all for local files and lets it up to the thumbnailer to provide a (hopefully) quick preview. But it looks that in your case there seems to be an issue with the JPEG-thumbnailer... :-(

(btw: the file size limit for remote file is still supported to limit the traffic required to download the file to generate a preview)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay, in this instance it looks like the thumbnailer is crashing...
To confirm this, can you check ~/.xsession-errors for anything of relevance? It will likely be at the very bottom of the file if you have just run the Okular command I gave above.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
wes33
Registered Member
Posts
103
Karma
1
nothing shows up in ~/.xsession-errors sorry to say
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Please run "kdebugdialog" and ensure all areas are enabled, then try again.
(After completing the test you probably want to disable them again to ensure your disk isn't filled up with plenty of debugging output).


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
wes33
Registered Member
Posts
103
Karma
1
after kdebugdialog enabled the okular thumbnail command:

(I guess the "okular(32101)/kio (Slave) KIO::Slave::gotInput: slave died pid = 32103" is where the failure occurs)

Code: Select all
okular thumbnail:///home/wesi72600/Pictures/21\ feb\ 2013/IMG_0098.JPG
okular(32101)/kdeui (KGlobalAccel) KActionCollection::addAction: Registering action  "go_first"  under new name  "first_page"
okular(32101)/kdeui (KGlobalAccel) KActionCollection::addAction: Registering action  "go_last"  under new name  "last_page"
okular(32101)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-wesi72600/ksycoca4"
okular(32101)/kdeui (KGlobalAccel) KActionCollection::addAction: Registering action  "file_save_as"  under new name  "file_save_copy"
okular(32101)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(32101)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(32101)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(32101)/kio (KDirWatch) KDirWatchPrivate::KDirWatchPrivate: INotify available:  true
okular(32101)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(32101)/kdeui (KMainWindow) KMainWindow::applyMainWindowSettings: KMainWindow::applyMainWindowSettings  "MainWindow"
okular(32101)/kdeui (KMainWindow) KMainWindow::applyMainWindowSettings: KMainWindow::applyMainWindowSettings  "MainWindow"
okular(32101)/kdeui (KMainWindow) KMainWindow::applyMainWindowSettings: KMainWindow::applyMainWindowSettings  "MainWindow"
okular(32101)/kdeui (KMainWindow) KMainWindow::applyMainWindowSettings: KMainWindow::applyMainWindowSettings  "MainWindow"
okular(32101)/kparts KParts::ReadWritePart::setModified: setModified( false )
okular(32101)/kparts KParts::ReadWritePart::setModified: setModified( false )
okular(32101) KSharedUiServerProxy::KSharedUiServerProxy: kuiserver registered
okular(32101)/kparts KActivities::ResourceInstance::ResourceInstance: Creating ResourceInstance: empty for now
okular(32101)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xffd300)
okular(32101)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "file"
okular(32101)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 5 m_maxConnectionsPerHost: 5
okular(32101)/kio (Slave) KIO::Slave::createSlave: createSlave "file" for KUrl("file:///tmp/kde-wesi72600/okularB32101.JPG")
okular(32101)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-wesi72600/okulary32101.slave-socket"
okular(32101)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xff2e10)
okular(32101)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "thumbnail"
okular(32101)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 1 m_maxConnectionsPerHost: 1
okular(32101)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-wesi72600/okularF32101.slave-socket"
okular(32101)/kio (Slave) KIO::Slave::createSlave: createSlave "thumbnail" for KUrl("thumbnail:/home/wesi72600/Pictures/21 feb 2013/IMG_0098.JPG")
okular(32101)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-wesi72600/okularX32101.slave-socket"
okular(32101)/kio (Slave) KIO::Slave::gotInput: slave died pid =  32103
okular(32101)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("thumbnail:/home/wesi72600/Pictures/21 feb 2013/IMG_0098.JPG")
okular(32101)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0xff2e10) KIO::Slave(0x1033eb0)
okular(32101)/kio (Scheduler) KIO::SchedulerPrivate::cancelJob: KIO::TransferJob(0xffd300) KIO::Slave(0xfda9d0)
okular(32101)/kio (Scheduler) KIO::SchedulerPrivate::cancelJob: Scheduler: killing slave  32102
okular(32101)/kio (Slave) KIO::Slave::kill: killing slave pid 32102 ( "file://" )
okular(32101)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0xffd300) KIO::Slave(0xfda9d0)
okular(32101)/kdeui (KNotification) KNotificationManager::notificationClosed: 1930
okular(32101)/kio (Scheduler) KIO::SchedulerPrivate::slotSlaveDied: KIO::Slave(0x1033eb0)
okular(32101)/kparts KParts::ReadWritePart::setModified: setModified( false )
okular(32101)/kparts KParts::Part::~Part: deleting widget Sidebar(0xdb7fe0) ""
okular(32101)/kio (KDirWatch) KDirWatchPrivate::KDirWatchPrivate: INotify available:  true
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
That output looks relatively routine for running Okular with debug output enabled.
Can you tail the content of ~/.xsession-errors while running the Okular command and see what is printed out there?

In particular, anything relating to kio_thumbnail is important here.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
wes33
Registered Member
Posts
103
Karma
1
Can you tail the content of ~/.xsession-errors while running the Okular command and see what is printed out there?


as noted above, nothing gets appended to the .xsessions-errors file after running the okular command
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay... that is weird - with kdebugdialog one should definitely get plenty of output.

After adjusting kdebugdialog settings to ensure plenty of debug output, try the following (in a separate terminal, expect plenty of output).
Code: Select all
killall klauncher && kdeinit4 &


This was launch kdeinit4 in a terminal, which is one of the processes responsible for launching KIO slaves - which is the process which appears to be crashing in this instance. At the very least it should log the operation of generating the (invalid) thumbnail.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
wes33
Registered Member
Posts
103
Karma
1
killall klauncher && kdeinit4 &


I think you got it!

the output from the above command that matters is this:

Code: Select all
kio_thumbnail(11589) ThumbnailProtocol::get: Guess plugin:  "jpegthumbnail"
Not a JPEG file: starts with 0x89 0x50
okular(11586)/kio (Slave) KIO::Slave::gotInput: slave died pid =  11589


I opened a "bad" file with gimp and exported it to a new jpg file. Still just as big but now
the thumbnail works.

It appears that digikam is not saving my pictures in a fully standard jpg format.

The reason is this: I had set digikam to save in lossless format, but (see my other post
about digikam) the rename function in digikam is broken so my pictures are png
fies which are named *.jpg which - I think - is confusing okular's thumbnailing.

If I manually rename one of the "bad" images from x.jpg to x.png then the thumbnails
pop right up.

It I let digikam download jpegs as jpegs then the thumbnails work.

One obvious question: why doesn't the thumbnailer examine the beginning of files
*before* "guessing" the file type (isn't that supposed to be one of the advantages of
linux over windows)?

So thanks for your help.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I am not sure why the thumbnailing system does not use the file mimetype to decide which thumbnailer to use. One of the developers will need to answer that.

You may also wish to report the incorrect file type saving to the Digikam developers so they can correct that.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], markhm, sethaaaa, Sogou [Bot], Yahoo [Bot]