Jump to content

larrys bmp2rgn for more than one pic?


Recommended Posts

Hi folks,

is it possible to draw a transparent shadow around a pic? I have two images, one 150x150 jpg file (nopic.jpg) and an transparent image showing a border(rahmen.bmp). Using the Larry's script only shows one picture:

#include <GUIConstants.au3>
DIM $_gui[10]

$_gui[0] = GUICreate("",127,136,-1,-1,$WS_POPUP)
GUICtrlCreatePic(".\nopic.jpg",0,0,127,136)
GUISetState()


GUICtrlCreatePic(".\rahmen.bmp",0,0,127,136)
$a = DLLCall(".\BMP2RGN.dll","int","BMP2RGN", _
            "str","pics\rahmen.bmp", _
            "int",0, _
            "int",0, _
            "int",0)

SetWindowRgn($_gui[1], $a[0])
GUISetState()


Sleep(2000)

Func SetWindowRgn($h_win, $rgn)
    DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1)
EndFunc

Is there a way to combine these two images like the example shown in goal.jpg?

Many thanx!!!!

Laetterman

post-11897-1169472540_thumb.jpg

Link to comment
Share on other sites

Hi folks,

is it possible to draw a transparent shadow around a pic? I have two images, one 150x150 jpg file (nopic.jpg) and an transparent image showing a border(rahmen.bmp). Using the Larry's script only shows one picture:

#include <GUIConstants.au3>
DIM $_gui[10]

$_gui[0] = GUICreate("",127,136,-1,-1,$WS_POPUP)
GUICtrlCreatePic(".\nopic.jpg",0,0,127,136)
GUISetState()
GUICtrlCreatePic(".\rahmen.bmp",0,0,127,136)
$a = DLLCall(".\BMP2RGN.dll","int","BMP2RGN", _
            "str","pics\rahmen.bmp", _
            "int",0, _
            "int",0, _
            "int",0)

SetWindowRgn($_gui[1], $a[0])
GUISetState()
Sleep(2000)

Func SetWindowRgn($h_win, $rgn)
    DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1)
EndFunc

Is there a way to combine these two images like the example shown in goal.jpg?

Many thanx!!!!

Laetterman

I don't mean to over-simplify, but couldn't you just combine them in photoshop or something, and then use the new image the way you want to?
Link to comment
Share on other sites

mh, can i combine a rgn and a pic? doesn't work for me... i just would like to a shadow effect to cd cover pics. there are several pics each in a seperate gui on the desktop. via double click the music starts playing this album. i don't want to add a shadow with photoshop for every new album, thought thihs is possible with autoit

Link to comment
Share on other sites

i already wrote and everyday use an autoitscript to show up all covers of my local music. i didn't told it because i thought it has nothing todo with the question, but maybe without it it's too hard too understand. So I have 80 different covers for 80 albums, and the possibility for easy adding of new covers. So it's NONSENS to add a shadow by using a grahical programm for every picture!!! Thought there is maybe an clever solution to make them look more plastic. In fact it should be like making a gui shape with bmp2rgn (for the shadow, whitch is the same for every picture, because all pics have the same size) and add (combine) a pic to this region (the music cover, which is always different). I'm no advanced coder so i thought maybe you have an idea, but using photoshop is shurely not the solution

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...