Choose style:

Author Topic: Imagemagick doesn't recognize JPEG (SOLVED)  (Read 3598 times)

0 Members and 1 Guest are viewing this topic.

Offline nberidze

  • Jr. Member
  • **
  • Posts: 60
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 5
Imagemagick doesn't recognize JPEG (SOLVED)
« on: July 03, 2014, 08:32:43 am »
After upgrading to P5, I'm trying to use the imagemagick command 'convert', but there is an error message, first about "no decode delegate for this image format", then if I explicitly state that it's JPEG, it insists "Not a JPEG file: starts with 0x44 0x53", even though the command 'file' tells me it is "JPEG image data, JFIF standard 1.01". IM was able do such a conversion before the upgrade.
« Last Edit: July 06, 2014, 07:09:49 pm by nberidze »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25459
  • Karma: 2800
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Imagemagick doesn't recognize JPEG
« Reply #1 on: July 03, 2014, 09:02:46 am »
The files are corrupt (probably on a dying SDcard ?) .. use photorec to recover them from the SDcard.

If you want a GUI for photorec .. install QPhotoRec with these commands:
Code: [Select]
mkdir ~/qphotorec
then
Code: [Select]
cd ~/qphotorec
then
Code: [Select]
wget http://sourceforge.net/projects/crunchyiconthem/files/QPhotoRec/qphotorec_1.0_all.deb
then
Code: [Select]
sudo dpkg -i qphotorec_1.0_all.deb
then
Code: [Select]
sudo apt install -f
You'll now find QPhotorec at
menu > System Tools > QPhotoRec

Now see this from step 5 onwards:
http://www.geekssharingspace.org/2013/12/qphotorec-10-data-recovery-software-to.html

I must add I haven't tried QPhotoRec myself.
« Last Edit: July 03, 2014, 09:19:12 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline nberidze

  • Jr. Member
  • **
  • Posts: 60
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 5
Re: Imagemagick doesn't recognize JPEG
« Reply #2 on: July 03, 2014, 09:55:48 am »
I tried it, thanks. It recovered about a thousand files from the SD card that were deleted, but it didn't recover those files which I need, which are not deleted and nicely visible in the file manager. How do I "recover" files that aren't actually deleted, and what may be the problem with these files, if I can view them on my screen and they seem to be all right?

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25459
  • Karma: 2800
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Imagemagick doesn't recognize JPEG
« Reply #3 on: July 03, 2014, 10:39:54 am »
You can view them onscreen .. in what software ?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline nberidze

  • Jr. Member
  • **
  • Posts: 60
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 5
Re: Imagemagick doesn't recognize JPEG
« Reply #4 on: July 03, 2014, 10:42:09 am »
Thumbnails appear in PCManFM, and I can for example double click and view them in Mirage.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25459
  • Karma: 2800
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Imagemagick doesn't recognize JPEG
« Reply #5 on: July 03, 2014, 12:10:28 pm »
In that case, why not try installing the GIMP and see if that can open them .. if it can, resave them from the GIMP
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline nberidze

  • Jr. Member
  • **
  • Posts: 60
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 5
Re: Imagemagick doesn't recognize JPEG
« Reply #6 on: July 03, 2014, 12:37:55 pm »
It's over forty files, I'd like to do a batch processing. But I'll try installing Gimp and report back. Thanks for always being there for us mortals! :)

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25459
  • Karma: 2800
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Imagemagick doesn't recognize JPEG
« Reply #7 on: July 03, 2014, 02:15:09 pm »
GIMP can batch process .. but if gimp can read them and you're more comfortable with imagemajick, maybe all the batch processing we'd need to apply in gimp is to re-export them :)

http://linuxforums.org.uk/index.php?topic=862.msg4492#msg4492
« Last Edit: July 03, 2014, 02:18:57 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline nberidze

  • Jr. Member
  • **
  • Posts: 60
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 5
Re: Imagemagick doesn't recognize JPEG
« Reply #8 on: July 03, 2014, 04:56:43 pm »
I tried opening 64 image files now in Gimp and the computer started to behave a bit strange. I do not want to spend time on learning how to write Gimp scripts and I definitely don't want to sit and click 64 times through the clicking procedure for "Save as...". I just want Imagemagick to work. These files are clearly not corrupted. I can open them in Gimp and other programs. I want to write a one line command to make 64 jpeg files into one pdf file. Can that be done in P5?

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25459
  • Karma: 2800
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Imagemagick doesn't recognize JPEG
« Reply #9 on: July 03, 2014, 07:11:55 pm »
Who said anything about scripting ?

if you open one of the jpg's in gimp .. then export it again as a jpg .. can imagemagick now convert it ?

Can you upload one of your jpg's somewhere so I can test it with imagemagick's convert .. to see if it's only your setup
(PM me a link if you don't want it public)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline nberidze

  • Jr. Member
  • **
  • Posts: 60
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 5
Re: Imagemagick doesn't recognize JPEG
« Reply #10 on: July 04, 2014, 07:01:13 am »
Yes. After opening the JPEG file in Gimp and saving it (also as JPEG), imagemagick had no difficulty converting it to a pdf.

Link to sample file sent in direct message.

Offline nberidze

  • Jr. Member
  • **
  • Posts: 60
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 5
Re: Imagemagick doesn't recognize JPEG
« Reply #11 on: July 05, 2014, 06:05:42 am »

if you open one of the jpg's in gimp .. then export it again as a jpg .. can imagemagick now convert it ?


Yes. Now what? Click through the 'Open' and 'Save as...' procedure 63 times more? Maybe my DSLR encodes JPEG in a way that IM can't handle.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25459
  • Karma: 2800
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Imagemagick doesn't recognize JPEG
« Reply #12 on: July 06, 2014, 05:01:45 pm »
See the link I provided earlier

First install gimp-plugin-registry
Code: [Select]
sudo apt install gimp-plugin-registry
Place all you pics in say a folder
~/Pictures/from-camera
create another folder called
create another directory at say
~/Pictures/from-camera/fixed

Fire up GIMP and go to Filters > Batch > Batch Process

In the resulting window choose the input tab .. and click "Add Files" .. browse to the ~/Pictures/from-camera directory and click the top file, then holding Shift key click the last file to select them all .. click the "Open" button ..

Back in the batch process window, go to the "Rename" tab .. in "Add Postfix" enter
-fuxed
Click the "Select Dir" button .. and point it at
~/Pictures/from-camera/fixed

Back in the batch process window, go to the "Output" tab, and select
Format: JPG

Click the "Start" button.

You'll then find the fixed files saved in
~/Pictures/from-camera/fixed
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline nberidze

  • Jr. Member
  • **
  • Posts: 60
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 5
Re: Imagemagick doesn't recognize JPEG
« Reply #13 on: July 06, 2014, 05:37:30 pm »
Thank you. It worked. This Gimp batch processing will certainly come in handy!  :)
« Last Edit: July 06, 2014, 07:10:27 pm by nberidze »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25459
  • Karma: 2800
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Imagemagick doesn't recognize JPEG
« Reply #14 on: July 06, 2014, 05:50:51 pm »
Yup it's certainly a handy tool .. you're welcome :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec