Closed heinerbilling closed 5 months ago
OK, I just tested on the current Git version and I cannot reproduce your problem
GDL> a=dist(400)
% Compiled module: DIST.
GDL> write_jpeg,'image.jpg',a
% Compiled module: WRITE_JPEG.
GDL> read_jpeg,'image.jpg',b
GDL> help, a,b
A FLOAT = Array[400, 400]
B BYTE = Array[400, 400]
GDL> !gdl
{
"RELEASE": "1.0.2-577-gcd1362cc",
"BUILD_DATE": "May 3 2024",
"EPOCH": 1714687200,
"GDL_USE_DSFMT": 1,
"GDL_USE_WX": 0,
"GDL_POSIX": 1
}
No changes in read_jpeg.pro
and write_jpeg.pro
since 3 years ...
Could you report the !gdl infos ? thanks
Hello, Alain
Thank you for your quick reaction. GDL> !gdl { "RELEASE": "1.0.1", "BUILD_DATE": "Jan 13 2023", "EPOCH": 1673564400, "GDL_USE_DSFMT": 1, "GDL_USE_WX": 0, "GDL_POSIX": 1 } help, !version.release
Hello, I'm a bit confused. If I do your test (first part) I get:
GDL> a=dist(400)
% Compiled module: DIST.
GDL> write_jpeg,'image.jpg',a
% Compiled module: WRITE_JPEG.
GDL> read_jpeg,'image.jpg',b
GDL> help,max(b)
<Expression> BYTE = 255
GDL> help,b
B BYTE = Array[400, 400]
GDL> write_jpeg,'image.jpg',b,tr=1
% WRITE_JPEG: Array must have 3 dimensions: B
% Error occurred at: WRITE_JPEG 101 /usr/local/share/gnudatalanguage/lib/write_jpeg.pro
% $MAIN$
% Execution halted at: $MAIN$
This is normal, since:
IDL> a=dist(400)
% Compiled module: DIST.
IDL> write_jpeg,'image.jpg',a
% Loaded DLM: JPEG.
IDL> read_jpeg,'image.jpg',b
IDL> help,b
B BYTE = Array[400, 400]
Please move to GDL 1.0.5 !
To be inform when a new version appears, I suggest you register to the GDL announces mailing list
Concerning your problem, with GDL 1.0.5 I have :
GDL> help, max(c)
<Expression> BYTE = 255
OK, we don't change read_jpeg.pro
and write_jpeg.pro
but a lot of internal code was change !
I write jpg-images with write_jpeg.pro in GDL !version.release '6.5' on a Linux-System using ImageMagick-6.9.7 After a system update I use GDL !!version.release '8.2' using ImageMagick-6.9.11 Here 3D- jpg-Images as well as png-Images are black. With read_jpeg these data are all . 2D Images are o.k. . Is this problem solved in later versions ? example: gdl a=dist(400) write_jpeg,'image.jpg',a ;image.jpg looks fine read_jpeg,'image.jpg',b help,max(b)