Forums > Jitter

desired: dynamic syntax for 32 bit with alpha png

March 9, 2006 | 7:15 pm

Thanks to consistent help,
I am inching closer to the goal.

Attached patch is crude background subtract
that saves sequence of Pngs
using count to increment filenames.

Result:PNG has a black background.

Desired Result: transparent background.

OS : Windows XP, Jitter 1.2.2

I think it is simply a problem with syntax I am sending to exportimage.I am concatinating strings using sprintf and sending "exportimage filename.png png-24 lossless"
How do i specify preserve alpha?

Thanks in advance as always,
Jhave
//
max v2;
#N vpatcher 0 0 1280 892;
#P user jit.pwindow 113 325 82 62 0 1 0 0 1 0;
#P user jit.pwindow 208 648 82 62 0 1 0 0 1 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 209 616 44 9109513 jit.matrix;
#P message 377 279 45 9109513 loadbang;
#P message 375 314 21 9109513 1.6;
#P window linecount 2;
#P comment 418 373 162 9109513 background averaging coefficient (larger values smoother);
#P flonum 375 377 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 375 402 133 9109513 slide_up $1 , slide_down $1;
#P newex 286 423 171 9109513 jit.slide @slide_up 2 @slide_down 2;
#P toggle 272 339 32 0;
#P newex 286 373 27 9109513 gate;
#P newex 208 448 88 9109513 jit.op @op absdiff;
#P window linecount 2;
#P comment 309 342 176 9109513 to set background , open gate for some period of time and then close gate;
#P window setfont "Sans Serif" 20.;
#P window linecount 1;
#P message 977 319 134 9109524 lossless;
#P message 826 320 140 9109524 png-24;
#P window setfont "Sans Serif" 9.;
#P message 778 323 29 9109513 .png;
#N counter 0 0 90;
#X flags 0 0;
#P newobj 721 251 68 9109513 counter 0 0 90;
#B color 5;
#P window setfont "Sans Serif" 14.;
#P number 720 323 53 14 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 602 200 48 9109513 metro 10;
#P toggle 602 181 15 0;
#P number 641 181 32 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 688 323 15 9109513 id;
#P newex 674 393 66 9109513 prepend set;
#P message 617 323 59 9109513 exportimage;
#P newex 674 367 200 9109513 sprintf %s %s%s%s %s %s;
#B color 5;
#P window linecount 2;
#P message 643 447 132 9109513 exportimage id69.png png-24 lossless;
#P button 601 225 15 0;
#P window linecount 1;
#P message 266 253 45 9109513 settings;
#P message 224 253 32 9109513 close;
#P message 181 253 29 9109513 open;
#P flonum 137 233 35 9 0.5 0 1 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 103 233 15 0;
#P newex 103 253 44 9109513 metro 2;
#P newex 103 291 95 9109513 jit.qt.grab 320 240;
#P window setfont "Sans Serif" 24.;
#P window linecount 3;
#P comment 851 213 393 9109528 Question: what is syntax of preserving transparency layer on the png as it is saved dynamically?;
#P window setfont "Sans Serif" 20.;
#P window linecount 11;
#P comment 854 397 399 9109524 png-24 lossless Results in a png with a black background /****/ I am trying to get a 32 bit with alpha png;
#P connect 4 0 3 0;
#P fasten 8 0 2 0 271 279 108 279;
#P fasten 7 0 2 0 229 279 108 279;
#P fasten 6 0 2 0 186 279 108 279;
#P fasten 3 0 2 0 108 284 108 284;
#P fasten 2 0 35 0 108 318 119 318;
#P connect 5 0 3 1;
#P fasten 2 0 24 0 108 419 213 419;
#P connect 24 0 33 0;
#P fasten 10 0 33 0 648 526 214 526;
#P connect 33 0 34 0;
#P connect 26 0 25 0;
#P connect 25 0 27 0;
#P fasten 28 0 27 0 380 420 291 420;
#P connect 27 0 24 1;
#P fasten 2 0 25 1 108 325 308 325;
#P connect 32 0 31 0;
#P connect 31 0 29 0;
#P connect 29 0 28 0;
#P connect 17 0 9 0;
#P connect 16 0 17 0;
#P fasten 9 0 12 0 606 279 622 279;
#P connect 15 0 17 1;
#P fasten 9 0 10 0 606 439 648 439;
#P fasten 13 0 10 0 679 429 648 429;
#P fasten 12 0 11 0 622 353 679 353;
#P connect 11 0 13 0;
#P fasten 9 0 14 0 606 279 693 279;
#P fasten 14 0 11 1 693 353 717 353;
#P connect 19 0 18 0;
#P fasten 9 0 19 0 606 246 726 246;
#P fasten 18 0 11 2 725 354 755 354;
#P fasten 9 0 20 0 606 279 783 279;
#P fasten 20 0 11 3 783 353 793 353;
#P fasten 9 0 21 0 606 246 831 246;
#P fasten 21 0 11 4 831 357 831 357;
#P fasten 22 0 11 5 982 357 869 357;
#P fasten 9 0 22 0 606 307 982 307;
#P pop;


Viewing 1 post (of 1 total)