POV-Ray : Newsgroups : povray.binaries.scene-files : POV-Ray Mosaic Memes : Re: POV-Ray Mosaic Memes Server Time
24 Jun 2026 14:03:39 EDT (-0400)
  Re: POV-Ray Mosaic Memes  
From: Peter Markley
Date: 17 Jun 2026 16:06:00
Message: <6a32fe28$1@news.povray.org>
On 6/17/26 10:42 AM, kurtz le pirate wrote:
> On 17/06/2026 12:05, jr wrote:
> I suspect that the image is hard-coded in little-endian mode.
> See <https://en.wikipedia.org/wiki/Endianness>

I think it's big-endian. Right here:

#macro C(h)(asc(substr(h,1,1))-48)*16+asc(substr(h,2,1))-48#end

Each number is encoded as 2 ASCII characters and the above macro decodes 
them. The first character (`substr(h,1,1)`) after conversion to a 
codepoint is multiplied by 16, whereas the second character 
(`substr(h,2,1)`) is not. So the more significant "digit" comes first.

Unless I'm having a dyslexic moment, that's big-endian.

-- 
/* https://petermarkley.com | (Render at 1280x384) */
#version 3.7;global_settings{assumed_gamma 1}#macro
B(a,b,c,d)box{-y,x+z texture{pigment{granite pigment_map{
[.2 rgb 0][.3 rgb 1]}scale 4 translate<-c,0,-d>}finish{ambient
1}}translate<a,0,b>}#end#macro C(h)(asc(substr(h,1,1))-48)*16+
asc(substr(h,2,1))-48#end camera{orthographic location<10,9,3>
direction-y right x*20 up z*6}#local s=array[24]{
"0:445<5251750:444;44","7<750<796853733;367:","4=7?2=774150010>3?46",
"3:762>00186733724=7?","1>601>04100937700<16","7340564>57034>35021?",
"334=7:74564>444>470<","520?403:716611536;32","067<622?194>602>622?",
"7>4<3=672>154=7?4665","1?5=792>444>15207779","2<3679034=7?2>003372",
"28337266622465364854","312;70201<6:69511?5=","72663?713;5<764:4546",
"7;0=43036:4:1?753423","595<000>792>70147320","7?440;026?643=674223",
"7;221<3:7=5>595=146?","595=3=6701365?4?4?3<","404431765:274;054658",
"467626792<32267=597=","3:7658554;0560764=28","4?7<77136?232>15520="
};#for(b,0,5)#for(a,0,19)#local i=(5-b)*4+floor(a/5);B(a,b,C(substr
(s[i],mod(a,5)*4+1,2)),C(substr(s[i],mod(a,5)*4+3,2)))#end#end


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.