Issues with Viewers for "special" images
Hi, yesterday after the latest updates I tried to view some "special" images. I tried to view a JPEG 2000 with extra/geeqie and with extra/krita and I tried to view some FITS {,demo} images with extra/stellarsolver and extra/kstars. I don't know if this worked before, it was the first time I tried to view those kinds of images by my Arch Linux install. It was impossible to view the JPEG 2000 and more or less impossible to view FITS images. Just extra/stellarsolver was able to view a FITS demo image, but failed most of the times, too. I was able to view the JPEG 2000 image on an iPad Pro. I don't want to troubleshoot those issues, I'm just interested if somebody was ever able to view JPEG 2000 and/or FITS images with applications from the official repos. Regards, Ralf
Hi Ralf, Am Montag, dem 09.06.2025 um 13:12 +0200 schrieb Ralf Mardorf:
Hi,
I tried to view a JPEG 2000 with extra/geeqie and with extra/krita and I
not sure if I have JPEG2000 images but tried to find some on the web and they opened wth Loupe, however not sure if they are the right format. Is this what you expect for a JPEG2000 file? file jpeg2000-home.jpg jpeg2000-home.jpg: JPEG image data, JFIF standard 1.01, resolution (DPI), density 72x72, segment length 16, progressive, precision 8, 800x400, components 3
tried to view some FITS {,demo} images with extra/stellarsolver and extra/kstars. I don't know if this worked before, it was the first time
Never came across that format. Good luck Frank
On Mon, 2025-06-09 at 14:41 +0200, Frank wrote:
Is this what you expect for a JPEG2000 file? file jpeg2000-home.jpg jpeg2000-home.jpg: JPEG image data, JFIF standard 1.01, resolution (DPI), density 72x72, segment length 16, progressive, precision 8, 800x400, components 3
Hi Frank, no, your file is a "classic" JPEG. JPEG 2000 ========= $ wget -q https://hirise-pds.lpl.arizona.edu/download/PDS/RDR/PSP/ORB_003400_003499/PS... $ file PSP_003434_1755_COLOR.JP2 PSP_003434_1755_COLOR.JP2: JPEG 2000 Part 1 (JP2) $ exiftool PSP_003434_1755_COLOR.JP2 ExifTool Version Number : 13.30 File Name : PSP_003434_1755_COLOR.JP2 Directory : . File Size : 592 MB File Modification Date/Time : 2016:08:27 00:12:51+02:00 File Access Date/Time : 2025:06:08 13:30:09+02:00 File Inode Change Date/Time : 2025:06:08 13:29:23+02:00 File Permissions : -rw-r--r-- File Type : JP2 File Type Extension : jp2 MIME Type : image/jp2 Major Brand : JPEG 2000 Image (.JP2) Minor Version : 0.0.0 Compatible Brands : jp2 Image Height : 83639 Image Width : 14423 Number Of Components : 3 Bits Per Component : 10 Bits, Unsigned Compression : JPEG 2000 Color Spec Method : Enumerated Color Spec Precedence : 0 Color Spec Approximation : Not Specified Color Space : sRGB URL : Exif Byte Order : Little-endian (Intel, II) Bits Per Sample : 8 Photometric Interpretation : BlackIsZero Strip Offsets : 181 Samples Per Pixel : 1 Rows Per Strip : 1 Strip Byte Counts : 1 Planar Configuration : Chunky Pixel Scale : 0.25 0.25 0 Model Tie Point : 0 0 0 6896111.375 -265319.125 0 Geo Tiff Version : 1.1.0 GT Model Type : Projected GT Raster Type : Pixel Is Area GT Citation : Equirectangular MARS Geographic Type : User Defined Geog Citation : GCS_MARS Geog Geodetic Datum : User Defined Geog Angular Units : Angular Degree Geog Ellipsoid : User Defined Geog Semi Major Axis : 3396190 Geog Semi Minor Axis : 3396190 Projected CS Type : User Defined Projection : User Defined Proj Coord Trans : Equirectangular Proj Linear Units : Linear Meter Proj False Easting : 0 Proj False Northing : 0 Proj Center Long : 180 Proj Center Lat : 0 Image Size : 14423x83639 Megapixels : 1206.3 FITS ==== https://fits.gsfc.nasa.gov/fits_samples.html https://fits.gsfc.nasa.gov/nrao_data/tests/incunabula/orion-16.fits https://fits.gsfc.nasa.gov/nrao_data/tests/incunabula/m87-32.fits Regards. Ralf
Hi, On 6/9/25 15:37, Ralf Mardorf wrote:
JPEG 2000 =========
$ wget -q https://hirise-pds.lpl.arizona.edu/download/PDS/RDR/PSP/ORB_003400_003499/PS...
I didn't want to download this almost 600 MB large image, so I went with "sample1.jp2" I found on https://toolsfairy.com/image-test/sample-jp2-files (a random site that was the first result when I searched for JPEG 2000 sample images). When running xdg-open with the file, it ran Okular, which opened the file without a problem (as far as I can tell). Then I also tried Gwenview, which is my go-to image viewer and it opened it as well. Then I tried GIMP (for the use case of needing to edit the picture) and again with no problems. So I'd say that for JPEG 2000 there definitely are several applications in standard repositories. Although I frankly have no idea how well they would cope with an image _that_ large, as the one you were trying. Ondra -- Regards, Ondra Kučera
On Mon, 2025-06-09 at 16:23 +0200, Ondřej Kučera wrote:
Although I frankly have no idea how well they would cope with an image _that_ large, as the one you were trying.
$ gwenview PSP_003434_1755_COLOR.JP2 org.kde.kdegraphics.gwenview.lib: Unresolved raw mime type "image/x-samsung-srw" qt.dbus.integration: QDBusConnection: name 'org.freedesktop.UDisks2' had owner '' but we thought it was ':1.655' maximum memory limit (2097152000) would be exceeded error: cannot decode code stream jas_image_decode: decode operation failed Jasper library can't decode Jpeg2000 image data maximum memory limit (2097152000) would be exceeded error: cannot decode code stream jas_image_decode: decode operation failed Jasper library can't decode Jpeg2000 image data $ gwenview Desktop/sample-jp2-files-sample1.jp2 [snip] $ geeqie Desktop/sample-jp2-files-sample1.jp2 [snip] Yes, it's the size. Viewing sample-jp2-files-sample1.jp2 works.
Hi all, On the subject of FITS image viewers, it is important to remember that the FITS (Flexible Image Transport System, an acronym as all things in astrophysics) format is designed primarily for carrying astrophysical data. As a result, I would always recommend using a proper viewer like `fv` (https://heasarc.gsfc.nasa.gov/docs/software/ftools/fv/fv_download.html) or SAOImageDS9 (https://sites.google.com/cfa.harvard.edu/saoimageds9/download). One should be aware that the AUR package for the latter has been plagued with packaging issues, while the source code for the former is not distributed separately but only as a part of the full HEASoft package (though is under a FOSS license as the work of US government employees, and this is simply an issue of the way it's packaged and not a licensing thing). The main problem with a quote-unquote 'naïve' FITS image viewer is that there are many kinds of FITS files that are not actually images. While in this case it seems this file was actually an image, depending on the extensions in the file, it may be an event file, a spectrum file, or a table. So again I advise readers to consider using a proper tool to check FITS extensions and headers, since not all FITS files are images (despite the acronym). I have not used e.g. GIMP's tools to look at FITS images, but if it doesn't properly handle displaying the headers, or tabbing through multiple image extensions, then it's likely users will find that an inadequate solution. In a perfect world I think DS9 would get enough AUR votes to be considered for Extra status but I think that's unlikely. Regards, Jack R. Uteg
Thank you Jack, I'll take a look at aur/ds9 ASAP. Regards, Ralf
On 25-06-09 13:12:02, Ralf Mardorf wrote:
yesterday after the latest updates I tried to view some "special" images.
gimp should work, for FITS you do need extra/cfitsio Packages (2) cfitsio-1:4.6.2-1 gimp-3.0.4-3 also imagemagick should do the trick as well, at least for jpeg 2000 Packages (2) imagemagick-7.1.1.47-2 openjpeg2-2.5.3-1 $ magick display <path/to/image>
On Mon, 2025-06-09 at 13:25 +0000, moxie.arch@posteo.net wrote:
gimp should work, for FITS you do need extra/cfitsio Packages (2) cfitsio-1:4.6.2-1 gimp-3.0.4-3
I'll take a look at this at another time. Due to countless issues with gimp I migrated to krita.
also imagemagick should do the trick as well, at least for jpeg 2000 Packages (2) imagemagick-7.1.1.47-2 openjpeg2-2.5.3-1
$ magick display <path/to/image>
Neither imagemagick nor ffmpeg do work for me. FWIW an iPad Pro is able to view https://hirise-pds.lpl.arizona.edu/download/PDS/RDR/PSP/ORB_003400_003499/PS... . $ pacman -Qi imagemagick | grep Optional\ Deps -A17 Optional Deps : ghostscript: PS/PDF support [installed] jbigkit: JBIG support [installed] libheif: HEIF support [installed] libjpeg-turbo: JPEG support [installed] libjxl: JPEG XL support [installed] libraw: DNG support [installed] librsvg: SVG support [installed] libtiff: TIFF support [installed] libultrahdr: UHDR support [installed] libwebp: WEBP support [installed] libwmf: WMF support [installed] libzip: OpenRaster support [installed] ocl-icd: OpenCL support [installed] openexr: OpenEXR support [installed] openjpeg2: JPEG2000 support [installed] djvulibre: DJVU support [installed] pango: Text rendering [installed] Required By : digikam dvdauthor gifcurry perl-gtk3-imageview shutter zbar $ magick PSP_003434_1755_COLOR.JP2 [snip] magick: invalid argument for option PSP_003434_1755_COLOR.JP2 @ error/magick-cli.c/MagickImageCommand/1358. $ magick PSP_003434_1755_COLOR.JP2 PSP_003434_1755_COLOR.png Killed $ ffmpeg -i PSP_003434_1755_COLOR.JP2 PSP_003434_1755_COLOR.jpg [snip] [jpeg2000 @ 0x5577c2592480] [IMGUTILS @ 0x7f2d5b9fe290] Picture size 14423x83639 is invalid [jpeg2000 @ 0x5577c2592480] Large Dimensions is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented. [jpeg2000 @ 0x5577c2592480] If you want to help, upload a sample of this file to https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org) [jpeg2000 @ 0x5577c2592480] error during processing marker segment ff51 [vist#0:0/jpeg2000 @ 0x5577c257cf40] [dec:jpeg2000 @ 0x5577c2581040] Decoding error: Not yet implemented in FFmpeg, patches welcome [vist#0:0/jpeg2000 @ 0x5577c257cf40] [dec:jpeg2000 @ 0x5577c2581040] Decode error rate 1 exceeds maximum 0.666667 Cannot determine format of input 0:0 after EOF [vf#0:0 @ 0x5577c257be40] Task finished with error code: -1094995529 (Invalid data found when processing input) [vist#0:0/jpeg2000 @ 0x5577c257cf40] [dec:jpeg2000 @ 0x5577c2581040] Task finished with error code: -1145393733 (Error number -1145393733 occurred) [vist#0:0/jpeg2000 @ 0x5577c257cf40] [dec:jpeg2000 @ 0x5577c2581040] Terminating thread with return code -1145393733 (Error number -1145393733 occurred) [vf#0:0 @ 0x5577c257be40] Terminating thread with return code -1094995529 (Invalid data found when processing input) [vost#0:0/mjpeg @ 0x5577c257d580] Could not open encoder before EOF [vost#0:0/mjpeg @ 0x5577c257d580] Task finished with error code: -22 (Invalid argument) [vost#0:0/mjpeg @ 0x5577c257d580] Terminating thread with return code -22 (Invalid argument) [out#0/image2 @ 0x5577c257d140] Nothing was written into output file, because at least one of its streams received no packets. frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A Conversion failed!
On 25-06-09 16:05:54, Ralf Mardorf wrote:
Neither imagemagick nor ffmpeg do work for me.
ah, I didn't realize is such massive image, if you want to convert it to PNG I would use openjpeg2 $ opj_decompress -i PSP_003434_1755_COLOR.JP2 -o output.png It does take long time and created ~845M png /usr/bin/opj_decompress is owned by openjpeg2 2.5.3-1 ------------------------------------------------------------------------------ I was able to get normal jpg out of it as well, it's resized and small with $ gm convert PSP_003434_1755_COLOR.JP2 -resize 10% output.jpg /usr/bin/gm is owned by graphicsmagick 1.3.45-4 ------------------------------------------------------------------------------ you could also create tiles out of the big image $ vips dzsave PSP_003434_1755_COLOR.JP2 output --layout=google --tile-size=512 --overlap=0 --depth=onetile /usr/bin/vips is owned by libvips 8.16.1-2 ------------------------------------------------------------------------------ I am not sure if these work for your usecase, opening the image as is did seem to slurp 22.5G ram and took awhile but it was possible with gimp, couldn't find quick and good viewer for it though because of the resolution/size
GIMP works here (https://i.imgur.com/MGOr4CV.png and https://i.imgur.com/5MIMoyr.png), but it takes 20 GB of RAM to open. Krita seems to choke with the color space (https://i.imgur.com/q6ewqqB.png), even after fixing the file extension (.jp2 instead of .JP2).
participants (6)
-
Frank
-
Jack Renton Uteg
-
moxie.arch@posteo.net
-
Ondřej Kučera
-
Ralf Mardorf
-
Tiago de Paula