|
|
Hi(gh)!
Recently, I started generated "color profiles" from ripped DVDs using
the following POV script:
// begin of code
#declare
path="/home/Video/Filme/Filme_in_Bearbeitung/Die_Simpsons_Der_Film/Durchschnittsfarbpixel/"
#declare file="simpsons_1pixel-"
#declare f=1;
#declare fac=25;
#declare F_Incandescent=
finish { ambient 1 diffuse 0 }
#declare T_White=
texture
{
pigment { color rgb 1 }
finish { F_Incandescent }
}
#declare frames = 124819;
#if (frames/fac-div(frames, fac) < 0.5)
#declare striplength=floor(frames/fac);
#else
#declare striplength=ceil(frames/fac);
#end
#declare image_w=striplength+100;
#declare image_center=image_w/2;
#declare strip_offset=<50, 60, 0>;
#declare StripBorderLong=
box
{
<0, 0, -0.01>, <striplength+4, 2, 1>
texture { T_White }
}
#declare StripBorderShort=
box
{
<0, 0, 0>, <2, 20, 1>
texture { T_White }
}
#declare Minute=
box
{
0, <2, 3, 1>
texture { T_White }
}
#declare FiveMinutes=
box
{
0, <2, 5, 1>
texture { T_White }
}
#include "functions.inc"
camera
{
orthographic
right <image_w, 0, 0>
up <0, 100, 0>
location <image_center, 50, -10>
look_at <image_center, 50, 0>
}
/* background
{
color rgb 1
} */
#while (f < frames)
#declare g=0;
#declare sumcolvect=<0, 0, 0>;
#while (g < fac & f+g <= frames)
#declare P_Pixel=
pigment
{
image_map
{
#declare filefull = concat(path, file, str(f+g, -6, 0), ".png");
png filefull
}
}
#declare sumcolvect=sumcolvect+eval_pigment(P_Pixel, <0.5, 0.5, 0>);
#declare g=g+1;
#end
#declare C_Avgcolor=sumcolvect/fac;
#declare AvgcolorPixel=
box
{
0, <1, 20, 1>
texture
{
pigment { color rgb C_Avgcolor }
finish { F_Incandescent }
}
}
object { AvgcolorPixel translate strip_offset+<div(f, 25), -20, 0> }
#declare f=f+fac;
#end
object { StripBorderLong translate strip_offset-<2, 0, 0> }
object { StripBorderLong translate strip_offset-<2, 22, 0> }
object { StripBorderShort translate strip_offset-<2, 20, 0> }
object { StripBorderShort translate strip_offset+<striplength, -20, 0> }
#declare minspace=1500/fac;
#declare p=0;
#while (p*minspace < striplength)
object
{
#if (mod(p, 5) = 0)
FiveMinutes
#else
Minute
#end
translate strip_offset+<p*minspace-1, 2, 0>
}
#if (mod(p, 5) = 0)
#declare hours=div(p, 60);
#declare minutes = p-hours*60;
text
{
ttf "../Fonts/arial.ttf"
concat(str(hours, 1, 0), ":", str(minutes, -2, 0), "'")
1, 0
scale 20
translate strip_offset+<p*minspace-20, 12, 0>
texture { T_White }
}
#end
#declare p=p+1;
#end
// end of code
It worked a few times, but after this, I only get various error
messages, the last one was:
povray: malloc.c:2372: sysmalloc: Assertion `(old_top == (((mbinptr)
(((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct
malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >=
(unsigned long)((((__builtin_offsetof (struct malloc_chunk,
fd_nextsize))+((2 *(sizeof(size_t))) - 1)) & ~((2 *(sizeof(size_t))) -
1))) && ((old_top)->size & 0x1) && ((unsigned long) old_end & pagemask)
== 0)' failed.
Or is my RAM starting to disintegrate?
See you in Khyberspace!
Yadgar
Post a reply to this message
|
|