Hi Guillermo, I believe the situation you're describing is you have effectively a series of (3,x,y) images. You mention "reducing", but you haven't said what you mean by that - would it turn that series of images into one image?
wpic is intended to write out a single image, so an ndarray with multiple images won't work with that. To write out a series of images as a movie you could use wmpeg, or just to store the data you could use https://metacpan.org/pod/PDL::IO::FastRaw and specifically writefraw. Otherwise to write each image in its own file you could use something like: $_->wpic(sprintf "img%03d.png", $count++) for $pdl->dog; Does that help? Best regards, Ed ________________________________ From: Guillermo P. Ortiz <gor...@exa.unne.edu.ar> Sent: 23 October 2024 4:42 PM To: pdl-devel@lists.sourceforge.net <pdl-devel@lists.sourceforge.net>; pdl-gene...@lists.sourceforge.net <pdl-gene...@lists.sourceforge.net> Subject: [Pdl-devel] project ordered sequence image Hello everyone, I have created a pdl with structure (3,size_x,size_y,np) in order to manage different layer features to compose an rgb image. The idea that I can not connect yet is how to "reduce" over dim 3 to project to 3 X s_x X s_y rgb image in ordered fashion sequence. For example, suppose that for np=0, 1 and 2, in the resulting image is only view of 2 that is allowed by 1 and 0 layers, in that order. I am trying to use wpic command from PDL::IO::Pic module to convert via for example pnmtopng using options for it. There are hashes like {FLAGS => options} used for options {CONVERTER => 'pnmtopng'} indicating which conversor to use. But is seems to be intended of rgb 3(4) X s_x X s_y Thanks for your attention in advance Regards -- Dr. Guillermo P. Ortiz Electromagnetismo Aplicado Dto. FĂsica, Facultad de Ciencias Exactas Universidad Nacional del Nordeste Avda Libertad 5460, Campus UNNE. W3404AAS Corrientes, Argentina. (+54) 379-4424678 interno 4613 gortiz at unne edu ar
_______________________________________________ pdl-devel mailing list pdl-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pdl-devel