Page 2 of 2

Re: Odd image bleed when using convert under CentOS in a script.

Posted: 2009-10-06T18:32:20-07:00
by peter
This is the current message I'm getting from convert:

convert: missing an image filename `/home/pserwe/imgimport/out/420/./7310012519753.jpg' @ convert.c/ConvertImageCommand/2822.

Peter

Re: Odd image bleed when using convert under CentOS in a script.

Posted: 2009-10-06T19:01:43-07:00
by fmw42
Yep, I reinstalled the latest libjpeg and recompiled IM, are there any options to configure on either one of those that I need to be aware of?
I don't know. It has been too long since I installed libjpeg. Just check for error messages and/or look in the INSTALL file for instructions or the config.log for errors.

Any chance you can upgrade your IM. That might help, if it is old.

Re: Odd image bleed when using convert under CentOS in a script.

Posted: 2009-10-07T00:59:13-07:00
by peter
fmw42 wrote:
Yep, I reinstalled the latest libjpeg and recompiled IM, are there any options to configure on either one of those that I need to be aware of?
I don't know. It has been too long since I installed libjpeg. Just check for error messages and/or look in the INSTALL file for instructions or the config.log for errors.

Any chance you can upgrade your IM. That might help, if it is old.
Currently running the latest that I built on this box.

[root@pythagoras imgimport]# convert --version
Version: ImageMagick 6.5.6-9 2009-10-06 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

[root@pythagoras imgimport]#

Any idea who might be able to shed light on this error from convert and it's seeming lack of ability to write a jpeg?

Peter

Re: Odd image bleed when using convert under CentOS in a script.

Posted: 2009-10-07T10:34:07-07:00
by fmw42
have you tried a smaller jpg or some other image type such as gif or png?

do you have enough memory?

are the permission set to write for the directory you are using to save the jpg?

did you check for any errors in the compile of libjpeg or IM or check the config.log for errors?

Re: Odd image bleed when using convert under CentOS in a script.

Posted: 2009-10-07T11:10:59-07:00
by peter
fmw42 wrote:have you tried a smaller jpg or some other image type such as gif or png?

do you have enough memory?

are the permission set to write for the directory you are using to save the jpg?

did you check for any errors in the compile of libjpeg or IM or check the config.log for errors?
1. Haven't tried a smaller image, I can try to locate something else to try and test it.

2. Plenty of memory, system has 1.5G available, OS is using some of it for buffers, but it shouldn't be an issue. The old version (OS provided) worked just fine.

3. Permissions are not an issue, I'm converting from files owned by me in my home directory to files converted by me in my home directory. chown -R works wonders for straightening out trivial issues like permissions.

4. Config.log on libjpeg showed:

configure:7544: ./conftest
configure:7548: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "libjpeg"
| #define PACKAGE_TARNAME "libjpeg"
| #define PACKAGE_VERSION "7.0"
| #define PACKAGE_STRING "libjpeg 7.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "libjpeg"
| #define VERSION "7.0"
| #define PROTOTYPES 1
| #define __PROTOTYPES 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_STRING_H 1
| #define HAVE_PROTOTYPES 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_UNSIGNED_CHAR 1
| #define HAVE_UNSIGNED_SHORT 1
| #define INLINE __inline__
| /* end confdefs.h. */
|
| #ifdef HAVE_PROTOTYPES
| int is_shifting_signed (long arg)
| #else
| int is_shifting_signed (arg)
| long arg;
| #endif
| /* See whether right-shift on a long is signed or not. */
| {
| long res = arg >> 4;
|
| if (res == -0x7F7E80CL) { /* expected result for signed shift */
| return 1; /* right shift is signed */
| }
| /* see if unsigned-shift hack will fix it. */
| /* we can't just test exact value since it depends on width of long... */
| res |= (~0L) << (32-4);
| if (res == -0x7F7E80CL) { /* expected result now? */
| return 0; /* right shift is unsigned */
| }
| printf("Right shift isn't acting as I expect it to.\n");
| printf("I fear the JPEG software will not work at all.\n\n");
| return 0; /* try it with unsigned anyway */
| }
| int main() {
| exit(is_shifting_signed(-0x7F7E80B1L));
| }

It seemed to build anyway, and configure did not fail, neither did make test:

make[1]: Leaving directory `/usr/local/src/jpeg-7'
[root@pythagoras jpeg-7]# make test
rm -f testout*
./djpeg -dct int -ppm -outfile testout.ppm ./testorig.jpg
./djpeg -dct int -bmp -colors 256 -outfile testout.bmp ./testorig.jpg
./cjpeg -dct int -outfile testout.jpg ./testimg.ppm
./djpeg -dct int -ppm -outfile testoutp.ppm ./testprog.jpg
./cjpeg -dct int -progressive -opt -outfile testoutp.jpg ./testimg.ppm
./jpegtran -outfile testoutt.jpg ./testprog.jpg
cmp ./testimg.ppm testout.ppm
cmp ./testimg.bmp testout.bmp
cmp ./testimg.jpg testout.jpg
cmp ./testimg.ppm testoutp.ppm
cmp ./testimgp.jpg testoutp.jpg
cmp ./testorig.jpg testoutt.jpg
[root@pythagoras jpeg-7]#

Interestingly though, I get another (fatal?) seemingly non-fatal error from configure for IM 6.5.6-9:

conftest.c:58: error: expected ';', ',' or ')' before 'text'
conftest.c: In function 'main':
conftest.c:112: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'newvar'
conftest.c:112: error: 'newvar' undeclared (first use in this function)
conftest.c:112: error: (Each undeclared identifier is reported only once
conftest.c:112: error: for each function it appears in.)
conftest.c:122: error: 'for' loop initial declaration used outside C99 mode
configure:4622: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "ImageMagick"


And another:

conftest.c:8:28: error: ac_nonexistent.h: No such file or directory
configure:4889: $? = 1
configure: failed program was:
| /* confdefs.h. */

None of these seemed to indicate there was a fatal error of any type, and continued to build seemingly appropriately.

Peter

Re: Odd image bleed when using convert under CentOS in a script.

Posted: 2009-10-07T12:17:10-07:00
by fmw42
perhaps some of your .h files are not getting placed where needed? I am no expert on this. Seems like you will likely need to hear from Magick or Anthony to get beyond this or to let you know if these are relevant.

Testing with some other image type might give a clue to whether this is global to all images or just jpg

Re: Odd image bleed when using convert under CentOS in a script.

Posted: 2009-10-07T15:33:40-07:00
by peter
fmw42 wrote:perhaps some of your .h files are not getting placed where needed? I am no expert on this. Seems like you will likely need to hear from Magick or Anthony to get beyond this or to let you know if these are relevant.

Testing with some other image type might give a clue to whether this is global to all images or just jpg
How do I ask one of them to chime in?

Peter

Re: Odd image bleed when using convert under CentOS in a script.

Posted: 2009-10-07T16:48:01-07:00
by fmw42
Post another reply after mine, reiterating this issue in a brief way and ask if one of them might look into this. Mention their names and hopefully they will catch it. Magick may be done for the day, shortly, but Anthony will be getting online later. Magick usually looks at messages first thing in his morning, so he might not reply until tomorrow.

Re: Odd image bleed when using convert under CentOS in a script.

Posted: 2009-10-08T01:22:19-07:00
by peter
Okay.. from what I can tell, there is something broken in the CentOS port of IM.

Maybe it's just that it's old, maybe it's just that CentOS is a pile of @$%@. I'm not sure. I'm mostly a RH/derivatives sort of guy,
but in this particular scenario, Debian clearly wins.

I don't happen to be a big fan, having known some fanatical members of the Church of Debian in my past and not been terribly impressed, overall,
but Lenny clearly wins hands down over CentOS 5.3 on running batch conversion with ImageMagick. For some unknown reason, my build even failed, even though it appeared to have libjpeg support.

Anyway. Issue resolved, although I'd love to do is figure out how to get the latest and greatest to build properly on CentOS, after much time spent unsuccessfully googling for it, I'm happy to have this little issue resolved by switching to my other task machine that luckily happens to be running Lenny.

Peter

Re: Odd image bleed when using convert under CentOS in a script.

Posted: 2009-10-08T01:24:21-07:00
by peter
fmw42 wrote:Post another reply after mine, reiterating this issue in a brief way and ask if one of them might look into this. Mention their names and hopefully they will catch it. Magick may be done for the day, shortly, but Anthony will be getting online later. Magick usually looks at messages first thing in his morning, so he might not reply until tomorrow.
Yes, well..

The real issue at this point, is that in spite of everything seemingly working acceptably, I can't get libjpeg-7 and the latest IM to build properly on CentOS.

If Magick or Anthony happen to know the secret recipe for this, or can replicate it, I am more than willing to provide a build environment to test this on, as long as running it under Xen is acceptable ;)

Peter