You are not logged in.

#1 2012-06-05 22:23:09

xr4y
Member
Registered: 2011-05-06
Posts: 33

GNU Parallel and Imagemagick behaving strangely after update

I have been using this little script to convert 12bit jpeg2000 DCP frames in XYZ colorspace to 8 bit tifs in sRGB. For that I have used a combo of Imagemagick and GNU Parallel. Here is the code:

#!/bin/bash

xyz2srgb() {
    convert -verbose "$1" \
    -type TrueColor \
    -alpha Off \
    -gamma 0.384615 \
    -color-matrix "3.2404542 -1.5371385 -0.4985314 \
                  -0.9692660  1.8760108  0.0415560 \
                   0.0556434 -0.2040259  1.0572252" \
    -gamma 2.2 \
    -depth 8 \
    $(basename "$1" ".j2c").tif
}

export -f xyz2srgb
j2c="$(readlink -f "$1")"
tif="$(readlink -f "$2")"

cd "$tif"; find "$j2c" -name "*.j2c" | sort | parallel xyz2srgb {}

After updating the system both GNU parallel and Imagemagick fail. I get this error message from GNU parallel:

defined(@array) is deprecated at /usr/bin/parallel line 120.
	(Maybe you should just omit the defined()?)
defined(@array) is deprecated at /usr/bin/parallel line 580.
	(Maybe you should just omit the defined()?)
defined(@array) is deprecated at /usr/bin/parallel line 626.
	(Maybe you should just omit the defined()?)
defined(@array) is deprecated at /usr/bin/parallel line 627.
	(Maybe you should just omit the defined()?)
defined(@array) is deprecated at /usr/bin/parallel line 628.
	(Maybe you should just omit the defined()?)
defined(@array) is deprecated at /usr/bin/parallel line 661.
	(Maybe you should just omit the defined()?)
defined(@array) is deprecated at /usr/bin/parallel line 1530.
	(Maybe you should just omit the defined()?)
defined(@array) is deprecated at /usr/bin/parallel line 1536.
	(Maybe you should just omit the defined()?)
defined(@array) is deprecated at /usr/bin/parallel line 1542.
	(Maybe you should just omit the defined()?)

It does multi-processing after throwing this message but what is it saying? Even if you just do "parallel --help" it first throws that message!

Imagemagick on the other hand does the conversion but not as before. The images come out greyish and wrong. Really annoying, specially since this script have been running without problems before the update!

Anyone with a clue?

Offline

#2 2012-06-06 23:00:20

brainsonfire
Member
Registered: 2012-03-15
Posts: 3

Re: GNU Parallel and Imagemagick behaving strangely after update

I don't know perl. But the warning says, maybe we should just omit the defined?

sudo sed -i "s|defined[ \t]@|@|g" /usr/bin/parallel

Worked for me.

Offline

Board footer

Powered by FluxBB