Jump to content

transparency maybe?


Tomb
 Share

Recommended Posts

hi. i have this image Posted Image, and i place it ontop of another image in my GUI. when i do this, the white border around the image appears on the image underneath. how can i set transparency so the image, actually its my dog Toby, im making a game about him, shows above the background image and the white around the image is transparent.

Edited by Tomb616
Link to comment
Share on other sites

Search for larry and bmp2rgn or look here.

; EXAMPLE SHOWING Bitmap to Region function ( BMP2RGN() )
;
; int BMP2RGN("str","path to BMP",
;    "int",red value,
;    "int",green value,
;    "int",blue value)
;
; The red, green, blue values should be the color of the pixel
; in the BMP that you DON't want to see.
;

#include <GUIConstants.au3>
$gui = GUICreate("",127,136,-1,-1,$WS_POPUP)
GUICtrlCreatePic(".\larry.bmp",0,0,127,136)

$a = DLLCall(".\BMP2RGN.dll","int","BMP2RGN", "str",".\larry.bmp", "int",0, "int",0, "int",0)

SetWindowRgn($gui, $a[0])

GUISetState()
Sleep(5000)

Func SetWindowRgn($h_win, $rgn)
    DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1)
EndFunc
Edited by dabus
Link to comment
Share on other sites

There are many tools to draw this picture.

For example free from Microsoft paint.NET:

...

Paint.NET is free image and photo editing software for computers that run Windows. It features an intuitive and innovative user interface with support for layers, unlimited undo, special effects, and a wide variety of useful and powerful tools. An active and growing online community provides friendly help, tutorials, and plugins.

...

There is forum of Paint.NET and dicussion about the subject

Making Backgrounds of Images Transparent

The point of world view

Link to comment
Share on other sites

well,

first convert it to a .gif (e.g. ms paint).

then you make a child window with the $WS_POPUP,$WS_EX_LAYERED style of the same size as the image and put only this picture as a pic control in it.

this should be all.

then you can move the child window inside the parent and the white space is transparent.

imo it is not possible without the extra child window.

style = $WS_POPUP,

ex_style = $WS_EX_LAYERED

regards

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

could someone help me make a picture of meh cat on my desktop...like with a transparency slider...like the sticky notes

but have everything ready where i just put the picture on meh desktop and it finds it and makes it transparent

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...