Discussion:
背景を抜いたイメージの半透明処理
(too old to reply)
S.Ito
2004-12-01 02:52:26 UTC
Permalink
$B$$$D$b$*@$OC$K$J$C$F$$$^$9!#(BIto$B$H?=$7$^$9!#(B

$BGX7J?'$GH4$$$F!"$=$NH4$$$?%$%a!<%8(BA$B$r!"$"$k%$%a!<%8(BB$B$N>e$K=E$M$k:]!"(BA$B$rH4$$$?ItJ,$N$_H>F)***@2=$7$FI=<($7$?$$$N$G$9$,!"$I$N$h$&$JJ}K!$,$"$k$G$7$g$&$+!)(B

$B8=:_!"H>F)L@$J$iGX7J$rH4$+$J$$%$%a!<%8A4BN$G(BAlphaBlend$B$r;H$C$F=PMh$F$$$^$7$F!"GX7J$rH4$$$F40A4ITF)L@$G$J$i(BTransparentBlt$B$G=PMh$F$$$^$9!#(BBitBlt$B$N%i%9%?!<%*%Z%l!<%7%g%s$H$$$/$D$+$N%a%b%j(BDC(CBitmap$B8_49(B)$B$NAH$_9g$o$;$G=PMh$J$$$b$N$+$H$"$l$3$l9M$($F$_$^$7$?$,!"$I$&$bL/0F$,Ib$+$S$^$;$s!#:G8e$N<jCJ$H$7$F(B1$B%T%/%;%k$:$D=hM}!"$H$$$&$N$b$"$j$^$9$,!#Aw?.85$K%"%k%U%!%A%c%s%M%k$***@_$1!"GX7J?'$O(B0$B!"I=<(ItJ,$OG$0U$N%"%k%U%!CM$G(BAlphaBlend$B!"$H$$$&$N$,0lHVNI$5$=$&$J$N$G$9$,!"$3$s$J$3$H$,2DG=$+$9$i$o$+$j$^$;$s!#(B
$B%$%a!<%8(BA$B$O!"%$%a!<%8$J$i(BIPicture$B$N(BRender$B%a%=%C%I$G!"%F%-%9%H$O(BDrawText$B$G%a%b%j(BDC$B$KIA2h$7$F$$$^$9!#%$%a!<%8(BB$B$b%a%b%j(BDC$B>e$K$"$j$^$9!#(B

$B0J>e!"$465<(D:$1$l$P9,$$$G$9!#(B
WinXP HE SP2 VC6SP5 MFC.exe
UETA, Shin-ichi
2004-12-01 04:44:46 UTC
Permalink
$B$3$s$K$A$O!"?"ED$G$9!#(B
$BG$0U$N%"%k%U%!CM$G(BAlphaBlend$B!"$H$$$&$N$,0lHVNI$5$=$&$J$N(B
$B$G$9$,!"$3$s$J$3$H$,2DG=$+$9$i$o$+$j$^$;$s!#(B
Alpha Blending $B$r3[LL$I$*$j$K$H$i$($l$P2DG=$K;W$($^$9$,(B...?

$B!V%l%$%d!<%I%&%#%s%I%&!W$,<j7Z$+$b$7$l$^$;$s!#(B

$B%l%$%d!<%I(B $B%&%#%s%I%&(B
http://www.microsoft.com/japan/msdn/windows/windows2000/layerwin.asp
Per Pixel Alpha Blend
http://www.codeproject.com/gdi/pxalphablend.asp

$B$:$C$H0JA0$K;n$7$?$-$j$J$N$G!"$&$m3P$($G$9(B ^^;)
$BB>$NJ}$N%U%)%m!<$r4|BT$7$^$9(B...$B!#(B
--
$B?"ED%7%9%F%`@_7W;vL3=j(B
Ueta System Design Studio
http://www1.odn.ne.jp/usdesign/
$B?"ED??0l(B
***@par.odn.ne.jp
Microsoft MVP for Visual C++
S.Ito
2004-12-01 05:58:44 UTC
Permalink
$B?"ED$5$s!"$3$s$K$A$O!#(B
$B$$$D$b$"$j$,$H$&$4$6$$$^$9!#(B
Post by UETA, Shin-ichi
$BG$0U$N%"%k%U%!CM$G(BAlphaBlend$B!"$H$$$&$N$,0lHVNI$5$=$&$J$N(B
$B$G$9$,!"$3$s$J$3$H$,2DG=$+$9$i$o$+$j$^$;$s!#(B
Alpha Blending $B$r3[LL$I$*$j$K$H$i$($l$P2DG=$K;W$($^$9$,(B...?
$B3N$+$K(BAlphaBlend$B$,$T$C$?$j$J$N$G$9$,!"4{$K%a%b%j(BDC$B$KIA2h$7$F$$$k%S%C%H%^%C%W8_49%a%b%j(BDC$B$K=jMW$N%"%k%U%!%A%c%s%M%k$r$I$&$9$l$***@8@.$G$-$k$N$+!"$=$b$=$b$=$s$J$3$H$,2DG=$J$N$+!"$H$$$&$3$H$,$o$+$j$^$;$s!#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q$7$$$G$9$M!#(B
DirectX $B$H$+$K$O$"$k$+$b$7$l$^$;$s$,!"$A$g$C$HLS?'$,0c$&$7(B(^^;

$BH>F)***@ItJ,$,!"$$$o$f$k%^%9%/$HF1$8$G0lN'A4It0l=o$H$$$&;v$G$"$l$P!"(B
$B%S%C%H%^%C%W$N%^%9%/=hM}$HF1$8$h$&$K!"J#?t2s$***@.:n6H$r$9$k$H$$$&<jCJ$b$"$j$^$9$,(B(^^;
K.J.K.
2004-12-02 03:48:11 UTC
Permalink
K.J.K.$B$G$9!#(B

# $B2~9T$OE,@Z$K!#0zMQ$5$l$k$3$H$rA0Ds$H$7$F2~9T0LCV$r7h$a$F2<$5$$!#(B

"S.Ito" wrote in message
$B4{$K%a%b%j(BDC$B$KIA2h$7$F$$$k%S%C%H%^%C%W8_49%a%b%j(BDC$B$K(B
MemDC$B$,J];}$9$k(BBitmap$B$K$O!"(BCreateCompatibleBitmap$B$G$O$J$/!"(B
CreateDIBSection$B$GF@$?$b$N$r;H$&$o$1$K$O$$$+$J$$$N$G$7$g$&$+(B?
--
K.J.K. mailto:***@koalanet.ne.jp
S.Ito
2004-12-03 02:56:30 UTC
Permalink
K.J.K.$B$5$s!"$3$s$K$A$O!#(B
$B%l%9$"$j$,$H$&$4$6$$$^$9!#(B
Post by K.J.K.
MemDC$B$,J];}$9$k(BBitmap$B$K$O!"(BCreateCompatibleBitmap$B$G$O$J$/!"(B
$B$3$l$r%]%9%HD:$$$F!"$$$m$$$m(BCreateDIBSection$B$rD4$Y$F$_$^$7$?!J$3$l$^$G(B
$B;H$C$?$3$H$,L5$+$C$?$b$N$G$9$+$i(B^_^;$B!K!#(B
$B$=$N7k2L!"(BBITMAPINFOHEADER$B$H$7$F(BPBITMAPV4(5?)HEADER$B$H$$$&$N$r8+$D(B
$B$1$^$7$?!#$3$l$N%a%s%P$K(BbV4AlphaMask$B$H$$$&$N$,$"$j!"$3$l$@$H(B32bit$B$N>e0L(B
8bit$B$r%"%k%U%!%A%c%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K!$H$H$b$K$3$l$K$b(B
$B%H%i%$$7$F!"B.EY$r8!>Z$7$F$_$h$&$H;W$$$^$9!#(B

K.J.K.$B$5$s!"$"$j$,$H$&$4$6$$$^$7$?!#(B

T.Sawamoto
2004-12-03 01:34:54 UTC
Permalink
$B$5$"$b$H$H?=$7$^$9!#(B
$B$b$&$R$H$D%$%a!<%8$rG^2p$5$;$l$P(BAPI$B$@$1$G2DG=$G$O$J$$$G$7$g$&(B
$B$+!)!JL5BL$,B?$$$G$9$,(B(^^;)$B!K(B

BitBlt(
hdcC, 0, 0, CXBMP, CYBMP,
hdcB, 0, 0,
SRCCOPY);
TransparentBlt(
hdcC, 0, 0, CXBMP, CYBMP,
hdcA, 0, 0, CXBMP, CYBMP,
colTransparent);
AlphaBlend(
hdcB, 0, 0, CXBMP, CYBMP,
hdcC, 0, 0, CXBMP, CYBMP,
blend);

$B$N$h$&$J46$8$G!D!#(B

$B!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A(B
$B$X(B $B$X(B $B$5$"$b$H(B
$B$N(B $B$N(B E-Mail : ***@quasar.sakura.ne.jp
$B!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A(B
S.Ito
2004-12-03 02:56:27 UTC
Permalink
$B$5$"$b$H$5$s!"$3$s$K$A$O!#(B
$B%l%9$"$j$,$H$&$4$6$$$^$9!#(B
Post by T.Sawamoto
$B$+!)!JL5BL$,B?$$$G$9$,(B(^^;)$B!K(B
BitBlt(
hdcC, 0, 0, CXBMP, CYBMP,
hdcB, 0, 0,
SRCCOPY);
TransparentBlt(
hdcC, 0, 0, CXBMP, CYBMP,
hdcA, 0, 0, CXBMP, CYBMP,
colTransparent);
AlphaBlend(
hdcB, 0, 0, CXBMP, CYBMP,
hdcC, 0, 0, CXBMP, CYBMP,
blend);
$B4y>e$G9M$($F8+$^$7$?$i!"3N$+$K$3$l$G$$$1$=$&$G$9$M!#;W$$$D$-$^$;(B
$B$s$G$7$?!#$J$s$+CN7C$NNX$r2r$$$F$$$k5$J,$G$7$?$,!"$*$+$2$5$^$G!"(B
$B$3$l$G$9$C$-$j$7$?46$8$G$9!#$"$H$OB.EY$@$1$NLdBj$G$7$g$&$+!#(B
$BAaB.$d$C$F$_$^$9!#(B
$B$5$"$b$H$5$s!"$"$j$,$H$&$4$6$$$^$7$?!#(B
Continue reading on narkive:
Loading...