How to create a semi transparent window in WPF that allows mouse events to pass through

I’ve had similar problem and found a solution: public static class WindowsServices { const int WS_EX_TRANSPARENT = 0x00000020; const int GWL_EXSTYLE = (-20); [DllImport(“user32.dll”)] static extern int GetWindowLong(IntPtr hwnd, int index); [DllImport(“user32.dll”)] static extern int SetWindowLong(IntPtr hwnd, int index, int newStyle); public static void SetWindowExTransparent(IntPtr hwnd) { var extendedStyle = GetWindowLong(hwnd, GWL_EXSTYLE); SetWindowLong(hwnd, GWL_EXSTYLE, extendedStyle … Read more

How to CREATE a transparent gif (or png) with PIL (python-imaging)

The following script creates a transparent GIF with a red circle drawn in the middle: from PIL import Image, ImageDraw img = Image.new(‘RGBA’, (100, 100), (255, 0, 0, 0)) draw = ImageDraw.Draw(img) draw.ellipse((25, 25, 75, 75), fill=(255, 0, 0)) img.save(‘test.gif’, ‘GIF’, transparency=0) and for PNG format: img.save(‘test.png’, ‘PNG’)

Adjusting Text background transparency

The alpha passed to plt.text() will change the transparency of the text font. To change the background you have to change the alpha using Text.set_bbox(): t = plt.text(0.5, 0.5, ‘text’, transform=ax.transAxes, fontsize=30) t.set_bbox(dict(facecolor=”red”, alpha=0.5, edgecolor=”red”)) #changed first dict arg from “color=”red”” to “facecolor=”red”” to work on python 3.6 To remove the border of the text … Read more

PNG Transparency with PHP

I have had success doing it like this in the past: $thumb = imagecreatetruecolor($newwidth, $newheight); imagealphablending($thumb, false); imagesavealpha($thumb, true); $source = imagecreatefrompng($fileName); imagealphablending($source, true); imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); imagepng($thumb,$newFilename); I found the output image quality much better using imagecopyresampled() than imagecopyresized()

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)