Last post Aug 03, 2007 08:47 AM by psychocoder
Jan 14, 2005 07:49 PM|jeffmc|LINK
Feb 02, 2005 12:30 PM|c#jones|LINK
<iframe src="image.aspx" />
<object type="text/x-scriptlet" width="300" height="300" data="image.aspx"> </object>
Feb 03, 2005 12:40 PM|Jigar|LINK
Feb 16, 2005 04:10 PM|neilmara|LINK
Nov 24, 2005 01:58 AM|smehaffie|LINK
Nov 24, 2005 07:41 AM|vikasumit|LINK
Nov 27, 2005 04:44 PM|adsaero|LINK
Nov 27, 2005 11:10 PM|smehaffie|LINK
Nov 30, 2005 08:23 AM|vikasumit|LINK
Nov 30, 2005 11:47 PM|smehaffie|LINK
I am not so lucky with my project..:o(
I try to set the 787 Byte to transparent color I ahve in my Colorpalette but all i get is White background, Now I use PNG format that is not Support in IE.
So to make it support in IE i load it with DirectX Alpha Transformer and it works fine, so no need of GIF files anymore..:o)
Also, For code running slow in VS2005, there must be some problem in your system that is hanging code for little time, otherwise I run my code in less than asecond for parsing two three palettes at one go..
maybe someBitmap are created in the loop that comsume memory and you are not getting it free slows down your code..
Thanks for such a learning post anyways
Dec 22, 2005 08:51 PM|neilmara|LINK
My original post was mistaken. By default the GDI creates a transparent GIF, with color 0 (black) being the transparent color, but there are several other colors in the palette which are also black. I did some testing and found that the GDI interprets
black as color 40.
So if you change byte 787 to 40, that should do it. If not try colors 16 through 39. If those don't work, your may work differently.
Try saving a GIF created by GDI to your hard drive then inspect the binary contents. The palette is from byte 14 to 781. Every three bytes represent one color, so bytes 14,15 and 16 represent the red, green and blue components of color 0. Find which colors
have RGB components all equal to zero and try those colors.
Jun 11, 2006 12:10 PM|micmic79|LINK
Since it took me so long to find the solution for a transparent background,
(For some reason I couldn’t find it in this respectable forum)
I figured that my time won’t to be more productive if I share with you my findings
So here there are:
The problem: A Dithery, grainy image is produced from the myGifImage.Save, and the transparent background
is actually black
The Solution: There is a free code that implements a
OctreeQuantizer function. This solves the above problem.
(You’ll need to add the OctreeQuantizer.cs and Quantizer.cs to your App_Code folder in your project )
And than call it :
OctreeQuantizer quantizer =
new OctreeQuantizer ( 255 , 8 ) ;
Bitmap quantized = quantizer.Quantize(objBitmap) )
You can find this code here: http://codebetter.com/blogs/brendan.tompkins/archive/2004/01/26/6103.aspx
Another problem I had was:
using Graphics.DrawString on transparent background you get the ugly font while if the background is not transparent it looks fine.
The solution: Add a rendering hint just prior to the DrawString statement
g.TextRenderingHint = TextRenderingHint.SingleBitPerPixelGridFit; //
<— This line solved it !
g.DrawString(text, font, Brushes.Black, new Point(x, 0));
This is where I find this wonderful solution:
Aug 03, 2007 08:47 AM|psychocoder|LINK
Actually you set an image src attribute to an aspx page, I do it with my CAPTCHA images
I have this in all pages (in all sites) where I have a CAPTCHA image
<img src="captcha.aspx" border="0" />