Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

per-pixel alpha blended GUI demo


  • Please log in to reply
48 replies to this topic
tic
  • Members
  • 1934 posts
  • Last active: May 30 2018 08:13 PM
  • Joined: 22 Apr 2007
thank you very much ahklerner. that worked. I would alos like to construct pngs from hex, as the limitation for icons is 256*256, but would like more freedom of size. I have read a fair portion of the png stuff on msdn and wiki etc but would like to know exactly how to construct the hex and compress it if anyone can help.

again, thank you

Edit:

For example this png, at 16*16 and black and white stripes (1st bar, ie bottom is black) and 4 pixels from the left on all rows are at transparency 128.

Posted Image

The hex for it is:

89504e470d0a1a0a

0000000d49484452000000100000001008060000001ff3ff610000002b74455874437265617469
6f6e2054696d650053617420312044656320323030372031393a30333a3535202d303030308fd6
64a50000000774494d4507d70c0113060a164c5fe2000000097048597300001ec100001ec101c3
6954530000000467414d410000b18f0bfc6105000000294944415478da63fc0f040ca48146640e
0b23232389fa51010be90e403360d405a32e187501755c0000214b19be5806263a000000004945
4e44ae426082

obviosuly without the sapces or new lines. I know the top part is the standard header, but am trying to figure out all the other stuff. As first it will need to be constructed and then compressed I imagine.

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

But I see there is compression with png, so what are the steps to first make the png format and then compress it if I wish to construct it from hex?

Layered windows use 32-bit bitmaps (usually device-independent, meaning the device doesn't need to be in 32-bit mode.) Actually, bitmaps may have PNG compression (except on Windows 95) but that is not a road worth going down.

"Constructing the hex" is also not worth doing. Learn the relevant GDI functions; they are faster and easier. My first post already demonstrates this - it uses CreateDIBSection to create a bitmap and DrawIconEx to draw an icon onto it.

tic
  • Members
  • 1934 posts
  • Last active: May 30 2018 08:13 PM
  • Joined: 22 Apr 2007
with your method could only small parts of the image be manipulated? And if so please could you explain how it is done, as i am really not grasping this. Say I already have a png and I want to edit a part of it to be "brighter" as in when you hover over a button, so essentially all the controls will actually be just part of the png, but it will glow and act accordingly depending on where the mouse is in relation to the window and where you click. so exactly the same concept as my icon bars example, but with pngs

hahamed
  • Members
  • 8 posts
  • Last active: Jun 02 2016 02:58 AM
  • Joined: 25 Sep 2013

its very cool.

But when I add ActiveX to gui, it doesn't show on window.

How can I add control to this scripted gui?

thanks