Rotation

semtex

Joined: 2002-09-09
Posts: 11
Posted: Mon, 2002-09-09 13:48

I installed everything and it all works except rotation. I click on the image to rotate and click 90 degrees. It goes back to the main page, but nothin happened to the image.

This is the error that occurs in error_log for httpd
jpegtopnm: Error writing single byte sample to file
pnmtojpeg: Error reading magic number from PBM file. Most often, this means your input file is empty.

How can i fix it?
:???:

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2002-09-10 03:45

Turn on debug mode in the config wizard, then try the rotation again and post the debug results here.

 
kdasu

Joined: 2002-08-31
Posts: 6
Posted: Sat, 2002-09-14 03:41

I just installed Gallery on my new Linux server and I too have the same Problem.
I am pasting the debug message below, if I Hand run the commmand too it does not succeed.
I built the NetPBM 10.8 for my Linux machine and I have all the binaries required.

The netpbm diagnostics also is happy.

----------------
Rotating photo.
(this may take a while)
Executing:

/usr/local/netpbm/bin/jpegtopnm /var/www/html/photoalbum/album10/ash_1.jpg | /usr/local/netpbm/bin/pnmflip -r270 | /usr/local/netpbm/bin/pnmtojpeg --quality=85 > /var/www/html/photoalbum/album10/ash_1.jpg.tmp

Results:
none

Error messages:
jpegtopnm: WRITING PPM FILE
jpegtopnm: Error writing single byte sample to file
pnmtojpeg: Error reading magic number from PBM file. Most often, this means your input file is empty.

Status: 1 (expected 0)

Executing:

/usr/local/jhead/jhead -te /var/www/html/photoalbum/album10/ash_1.jpg /var/www/html/photoalbum/album10/ash_1.jpg.tmp

Results:
Not JPEG: /var/www/html/photoalbum/album10/ash_1.jpg.tmp

Error messages:
Nonfatal Error : '/var/www/html/photoalbum/album10/ash_1.jpg.tmp' Invalid Exif start (1)

Status: 0 (expected 0)
Not closing this window because debug mode is on

--------

Thanks
Kdasu

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2002-09-14 03:57

Run this by hand:

/usr/local/netpbm/bin/jpegtopnm /var/www/html/photoalbum/album10/ash_1.jpg | /usr/local/netpbm/bin/pnmflip -r270 | /usr/local/netpbm/bin/pnmtojpeg --quality=85 > /tmp/fubar.jpg

Does that give an error?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2002-09-14 03:57

sorry, mean to say [b]what[/]b error does it give?

 
kdasu

Joined: 2002-08-31
Posts: 6
Posted: Sat, 2002-09-14 05:23

Seems like the same error

/usr/local/netpbm/bin/jpegtopnm /var/www/html/photoalbum/album10/ash_1.jpg | /usr/local/netpbm/bin/pnmflip -r270 | /usr/local/netpbm/bin/pnmtojpeg --quality=85 > /tmp/fubar.jpg
jpegtopnm: WRITING PPM FILE
pnmtojpeg: Error reading magic number from PBM file. Most often, this means your input file is empty.

kdasu

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2002-09-14 06:30

Ok, split it into multiple commands:

jpegtopnm ash_1.jpg > foo.pnm
pnmflip -r270 < foo.pnm > bar.pnm
pnmtojpeg --quality=85 < bar.pnm > baz.jpg

Examine the files at every step to make sure they're not 0 length.

 
kdasu

Joined: 2002-08-31
Posts: 6
Posted: Sat, 2002-09-14 07:29

[root@shristi album10]# jpegtopnm netpbm_test.jpg > foo.pnm
jpegtopnm: WRITING PPM FILE
[root@shristi album10]# ls -al foo.pnm
-rw-r--r-- 1 root root 230415 Sep 14 03:25 foo.pnm
[root@shristi album10]# pnmflip -r270 < foo.pnm > bar.pnm
Segmentation fault (core dumped)
[root@shristi album10]# which pnmflip
/usr/bin/pnmflip
[root@shristi album10]# /usr/local/netpbm/bin/pnmflip -r270 < foo.pnm > bar.pnm
Segmentation fault (core dumped)
[root@shristi album10]#

There is one pnmflip already in the system and one in the netpbm directory creaed for gallery. Is it a library issue but either one should have worked in that case

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2002-09-15 08:42

Hmm. Try using the NetPBM binaries from the Gallery Download page instead, and see if they have the same problem.