[fitsbits] Storing PDF and other graphics binary files in FITS {External} {External} {External}
Marjolein Verkouter
verkouter at jive.eu
Tue Mar 17 13:05:55 EDT 2026
Hi all,
It actually sounds you might be better off designing a container format for your datasets where the elements in the container are the PDFs, JPGs, and, eventually, the FITS file itself.
For example a MacOS Keynote presentation *looks* like a single file, but if you open it in the 'magical' way, you can see it's basically just a ZIP/GZIP'ed *folder* (into a single file) with a standard file containing the overarching meta data and all the content that is in the presentation is there as the raw files you dropped in the Keynote presentation editor.
(And a MacOS "Application" is similar - it's a directory containing (predictable) subdirectories with the various resources of the application (binaries, libraries, translations, resources like icons etc.)
That way you can archive/distribute your data sets as single entitities but be extremely flexible in content *and* the file types are not hidden and any user or application can work with them directly.
Cheers,
M
-----
Marjolein Verkouter (she/her)
Head Technical Operations and R&D
JIVE — Joint Institute for VLBI ERIC —
https://www.jive.eu/
Oude Hoogeveensedijk 4, 7991PD, Dwingeloo, The Netherlands
Phone: +31521596516
Mobile: +31625055174
Fax: +31521597332
My working schedule likely differs from yours. Do not feel compelled to read or reply to my email(s) outside office hours.
> On 16 Mar 2026, at 06:57, jaffe via fitsbits <fitsbits at listmgr.nrao.edu> wrote:
>
> In reply mostly to Bill's comment:my intent is to simplify my users' lives by putting everything they need in one file and supplying the meta-data they also need in a recognized format in the extension-header to the graphics.
>
> The PDF bytestream (or equivalently JPG or TIFF etc) is produced by in my case by the same Python code that generated the binary OI-FITS tables.
>
> The user would need an app to extract the bytestream from the FITS extension and feed it to a PDF viewer.
>
> At the crudest level this could indeed be just a generic "byte-dump" extension that just moves data from FITS files into/outof external files but provides headers for metadata.
>
> Along the lines of Lucio's comments it would be trivial to write an app that reads the extension header, recognizes the graphics format, and feeds the data via a pipe or similar mechanism into the appropriate viewer.
>
> Thanks for your comments.
> Walter
>
> -------- Original Message --------
> Subject: Re: [fitsbits] Storing PDF and other graphics binary files in FITS {External}
> Date: 2026-03-15 18:37
> From: William Pence via fitsbits <fitsbits at listmgr.nrao.edu>
> To: jaffe <jaffe at strw.leidenuniv.nl>
> Cc: Fitsbits <fitsbits at listmgr.nrao.edu>
> Reply-To: William Pence <wdpence2000 at yahoo.com>
>
> How would one view the PDF file if it is imbedded inside a FITS binary table? Would users find it more convenient to distribute ancillary data like this as separate files where they can be directly accessed alongside the primary FITS file.
>
> Bill
>
>> On Mar 15, 2026, at 12:26 PM, jaffe via fitsbits <fitsbits at listmgr.nrao.edu> wrote:
>> For an interferometric application I am storing the binary data in the so-called OI-FITS convention of FITS. But on the side I am generating rather complicated graphics files for my users, in this case in PDF. I would like to store the .pdf file as a table in the same FITS file. Is there a conventional way of doing this? I could create a 1 row binary table with the entire PDF file as the single column, but this could be several megabytes and might bother some reading or writing routines.
>> Is there any need to create a "GRAPHICS" extension to FITS?
>> Walter
>> _______________________________________________
>> fitsbits mailing list
>> fitsbits at listmgr.nrao.edu
>> https://listmgr.nrao.edu/mailman/listinfo/fitsbits
>
>
> _______________________________________________
> fitsbits mailing list
> fitsbits at listmgr.nrao.edu
> https://listmgr.nrao.edu/mailman/listinfo/fitsbits
>
> _______________________________________________
> fitsbits mailing list
> fitsbits at listmgr.nrao.edu
> https://listmgr.nrao.edu/mailman/listinfo/fitsbits
More information about the fitsbits
mailing list