| |
|
|
| Related: turn without GDI+: [...] Thanks on Andreas Miethe!
example :
$H windows.ph
$H includes\Functions_GDIPLUS.ph
$H includes\GDIP_Imageging.ph
$I includes\GDIP_Helper.inc
Declare gdiplusToken&,ImageObject&,GraphicObject&,ImageWidth&,ImageHeight&
Declare SIO&,DC&,BMP&,Brush&
CLS ~GetSysColor(~COLOR_3DFACE)
gdiplusToken& = InitGDIPlus()GDIPlus started
Image loading
ImageObject& = gdipLoadImage(eisbaer.jpg) way adjust
If ImageObject&
~GdipGetImageWidth(ImageObject&,ADDR(ImageWidth&))wide detect
~GdipGetImageHeight(ImageObject&,ADDR(ImageHeight&))Hoehe detect
DC& = ~CreateCompatibleDC(%hdc)SpeicherDC
wide and Höhe errechnet itself from the Bilddiagonalen
BMP& = ~CreateCompatibleBitmap(%hdc,INT(Sqrt((ImageWidth&^2)+(ImageHeight&^2))),INT(Sqr t((ImageWidth&^2)+(ImageHeight&^2))))Memory bitmap
Brush& = ~CreateSolidBrush(RGB(0,0,0))Brush
~SelectObject(DC&,BMP&)Memory bitmap in SpeicherDC
~SelectObject(DC&,Brush&)Brush for SpeicherDC
~Rectangle(DC&,0,0,491,491)rectangle draw
~GdipCreateFromHDC(DC&,ADDR(GraphicObject&))Graphics-of SpeicherDC
~GdipRotateWorldTransform(GraphicObject&,Single(45.0),1)Rotation settle
~GdipDrawImageRectI(GraphicObject&,ImageObject&,(ImageHeight&/2),-(ImageHeight&/ 2),ImageWidth&,ImageHeight&)
~GdipCreateBitmapFromHBITMAP(BMP&,0,Addr(SIO&))Image of Memory bitmap
SaveAsJPG(SIO&,AX.jpg,30) Image Save
straighten up
~GdipDeleteGraphics(GraphicObject&)
~GdipDisposeImage(ImageObject&)
~GdipDisposeImage(SIO&)
~DeleteObject(BMP&)
~DeleteObject(Brush&)
~DeleteDC(DC&)
Endif
Print ready
Waitinput
ExitGDIPlus(gdiplusToken&) GDIPlus terminate
End
salvo, iF. |
|
|
| |
|
|
|
| where wars I this Files since for GDIPlus?
mfg
$H includes\Functions_GDIPLUS.ph $H includes\GDIP_Imageging.ph $I includes\GDIP_Helper.inc |
|
|
| |
|
|
|
| is correct, The are missing here [...] . |
|
|
| |
|
|
|
| Hello I have these demonstration now loaded. The dog becomes beautiful as Sprite displayed, where The colour knows transparent is. Diesen worth have I on on :Single(1.0) set.
If I now with Paintshop The 1.wmf as 2.wmf abspeichere, is the knows not any more transparent at present. How comes the?
$H windows.ph
$H includes\Functions_GDIPLUS.ph
$H includes\GDIP_Imageging.ph
$I includes\GDIP_Helper.inc
Declare gdiplusToken&,ImageObject&,ImageObject1&,GraphicObject&,Attributes&
Declare Color_Matrix#
CLS ~GetSysColor(~COLOR_3DFACE)
gdiplusToken& = InitGDIPlus()GDIPlus started
Farb-Matrix set up 5 X 5 SingleFloat-values
Dim Color_Matrix#,4*(5*5)
Long Color_Matrix#,0 = Single(1.0),Single(0),Single(0),Single(0),Single(0)ruddy
Long Color_Matrix#,20 = Single(0),Single(1.0),Single(0),Single(0),Single(0)green
Long Color_Matrix#,40 = Single(0),Single(0),Single(1.0),Single(0),Single(0)blue
to that testing whom worth 4 (0.6) change
Long Color_Matrix#,60 = Single(0),Single(0),Single(0),Single(1.0),Single(0)alpha
Long Color_Matrix#,80 = Single(0),Single(0),Single(0),Single(0),Single(1.0)
Image loading
ImageObject& = gdipLoadImage(eisbaer.jpg) way adjust
ImageObject1& = gdipLoadImage(2.wmf) way adjust
If ImageObject&
and on %hWnd draw
~GdipCreateFromHWND(%hWnd,ADDR(GraphicObject&))any Graphics-Operationen on %hWnd
Image 1 draw
~GdipDrawImageI(GraphicObject&,ImageObject&,120,0)Bitmap draw
attributes lay out
~GdipCreateImageAttributes(Addr(Attributes&))
Color_Matrix To whom Attributen
~GdipSetImageAttributesColorMatrix(Attributes&,~ColorAdjustTypeDefault,1,Color_Matrix#,0,~ColorAdjustTypeDefault)
Image2 with Attributen draw
~GdipDrawImageRectRect(GraphicObject&,ImageObject1&,0.0,0.0,Single(400.0),Single(400.0),0.0,0.0,Single(400.0),Single(400.0),~UnitPixel,Attributes&,0,0)
~GdipDisposeImageAttributes(Attributes&)
~GdipDisposeImage(ImageObject&)
~GdipDisposeImage(ImageObject1&)
~GdipDeleteGraphics(GraphicObject&)
Dispose Color_Matrix#
Endif
Waitinput
ExitGDIPlus(gdiplusToken&) GDIPlus terminate
End
|
|
|
| |
|
|
|
| Please first of all [...] top up. |
|
|
| |
|
|
|
| what should I there top up........... |
|
|
| |
|
|
|
| The GDI+ Gibts with Microsoft. [...] Download requires though Validation the Rechtmässigkeit. |
|
|
| |
|
|
|
| have The now already loaded, runs everything so far.
me goes it only around the question: Why is the 2.wmf not transparent?
mfg |
|
|
| |
|
|
|
| Peter Bierbachh
what should I there top up...........
Öhm, have The Header-Files auffindig make can? |
|
|
| |
|
|
|
| The have I in these demonstration found with the I now my experiemente make. knows but not whether any command from the GDI include are.
mfg |
|
|
| |
|
|
|
| Sag me rather, How I The wmf-File transparent abspeichern can with Paintshop. |
|
|
| |
|
|
|
E.T. | @Peter: can because .wmf at all transparent ?? Have even time through div. Program geschaut, keines bid .wmf-Save with transparency on. |
|
|
| Grüße aus Sachsen... Mario WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte... | 02/16/09 ▲ |
|
|
|