JPEG image with transparency [closed]

Yes you can do this. The JPEG format makes provision for exchangeable image file format Color space definition Component sub-sampling registration Pixel aspect ratio definition JPEG/Exif is the most common for photography and JPEG/JFIF is the most commonly used for storage. When the others state JPEG format doesn’t provide for an alpha channel all they … Read more

How do you override the opacity of a parent control in WPF?

I was able to achieve something like this in pure xaml using a Brush to paint the main grids background. This way only parent grid will have its opacity set and its child elements won’t inherit it. <Grid x:Name=”LayoutRoot”> <Grid> <Grid.Background> <SolidColorBrush Color=”Black” Opacity=”0.5″/> </Grid.Background> <Grid.RowDefinitions> <RowDefinition Height=”0.333*”/> <RowDefinition Height=”0.333*”/> <RowDefinition Height=”0.333*”/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition … Read more

Is it possible to render web content over a clear background using WebKit?

Solved! Through ongoing research, scouring forums and source code repositories, I peiced together the necessary steps to accomplish this using only libwebkit and a standard compiz desktop (any Xorg desktop with compositing should do). For a current libwebkit (1.1.10-SVN), there is an Ubuntu PPA: deb http://ppa.launchpad.net/webkit-team/ppa/ubuntu jaunty main deb-src http://ppa.launchpad.net/webkit-team/ppa/ubuntu jaunty main As far as … Read more

How to make Matplotlib scatterplots transparent as a group?

Yes, interesting question. You can get this scatterplot with Shapely. Here is the code : import matplotlib.pyplot as plt import matplotlib.patches as ptc import numpy as np from shapely.geometry import Point from shapely.ops import cascaded_union n = 100 size = 0.02 alpha = 0.5 def points(): x = np.random.uniform(size=n) y = np.random.uniform(size=n) return x, y … Read more

Drawing PNG to a canvas element — not showing transparency

Don’t forget to add an event listener to the image’s load event. Image loading is something that happens in the background, so when the JavaScript interpreter gets to the canvas.drawImage part it is most likely the image probably will not have loaded yet and is just an empty image object, without content. drawing = new … Read more

CSS lighten child elements on parent mouseover

Like this? Live Demo Relevant CSS: #container:hover .inner { opacity: 0.8 } HTML: <div id=”container”> <div id=”left” class=”inner”></div> <div id=”right” class=”inner”></div> </div> Irrelevant CSS: #container { width: 300px; padding: 30px; overflow: hidden } .inner { width: 40%; height: 250px; background: #ccc } #left { float: left } #right { float: right } Truly Irrelevant CSS: … Read more

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