[R] how to read a PSB file in R?
Ranjan Maitra
m|m@|tr@ @end|ng |rom gmx@com
Mon May 26 17:49:13 CEST 2025
On Tue May20'25 12:15:41AM, Ranjan Maitra via R-help wrote:
> From: Ranjan Maitra via R-help <r-help using r-project.org>
> Date: Tue, 20 May 2025 00:15:41 -0500
> To: r-help using r-project.org
> Reply-To: Ranjan Maitra <mlmaitra using gmx.com>
> Subject: Re: [R] how to read a PSB file in R?
>
> On Tue May20'25 05:56:59AM, Rui Barradas wrote:
> > From: Rui Barradas <ruipbarradas using sapo.pt>
> > Date: Tue, 20 May 2025 05:56:59 +0100
> > To: Ranjan Maitra <mlmaitra using gmx.com>, r-help using r-project.org
> > Subject: Re: [R] how to read a PSB file in R?
> >
> > Às 03:17 de 20/05/2025, Ranjan Maitra via R-help escreveu:
> > > I have come across this file (warning, massive, 4.3 GB) https://esahubble.org/media/archives/images/original/heic1502a.psb and it appears to be a filetype I was not aware of previously.
> > >
> > > Is it possible to read the file in R using any tool? It is an image and I am looking for the RGB of the file.
> > >
> > > Many thanks and best wishes,
> > > Ranjan
> > >
> > > ______________________________________________
> > > R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > > https://stat.ethz.ch/mailman/listinfo/r-help
> > > PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
> > > and provide commented, minimal, self-contained, reproducible code.
> > Hello,
> >
> > Maybe this [1] will help. It seems that that file is well known to have
> > problems due to its large size but ImageMagick might be able to handle it.
> > And there is a magick package on CRAN [2].
> >
> >
> >
> > [1] https://github.com/ImageMagick/ImageMagick/issues/5509
> > [2] https://CRAN.R-project.org/package=magick
> >
> > Hope this helps,
>
> Rui,
>
> Thanks, but ImageMagick has a 65000 limit in each of the dimensions (I was not aware about this earlier than today). This image in 69500 in the x extent.
>
> I don't know that R's magick can override the ImageMagick limitation.
>
> Best wishes,
> Ranjan
I wanted to mention that after posting on the ImageMagick discussion board on github, I learnt that the restriction does not hold for converting to PNG (but for JPG) so I was able to convert it. However, I am not able to read the file into R (even with 0.5TB RAM) so I will unfortunately have to look at other options than R:-( I think I will write the code in C, but the PNG gives me a better start than I would have had with the original file.
Many thanks and best wishes,
Ranjan
More information about the R-help
mailing list