K
Kim Bach Petersen
Using asp.net, I'm generating bitmaps, that I stream either as gif- og
jpg-images (se code below). In both cases, the image-quality is rather poor:
http://dotnet.kensho.dk/scr_diagram.aspx?tal=12&jeg=3&fan=9&san=3&soc=7&kon=2&int=12&fol=5&img=gif
http://dotnet.kensho.dk/scr_diagram.aspx?tal=12&jeg=3&fan=9&san=3&soc=7&kon=2&int=12&fol=5&img=jpg
I would very much like to have clearer images, but I haven't been able
to locate a property that allows me to control the image quality /
compression.
Any ideas?
Thanks In advance,
Kim )
Dim intSize As Integer = 400
Dim decStep As Decimal = intSize/26
Dim bmp As Bitmap = New Bitmap(intSize,intSize)
Dim g As Graphics = Graphics.FromImage(bmp)
g.FillRectangle(New SolidBrush(Color.White), 0, 0, intSize, intSize)
g.FillEllipse(New SolidBrush(Color.Gold), decStep, decStep,
CInt(24*decStep), CInt(24*decStep))
g.FillEllipse(New SolidBrush(Color.Khaki), CInt(4*decStep),
CInt(4*decStep), CInt(18*decStep), CInt(18*decStep))
g.FillEllipse(New SolidBrush(Color.PaleGoldenrod), CInt(7*decStep),
CInt(7*decStep), CInt(12*decStep), CInt(12*decStep))
g.FillEllipse(New SolidBrush(Color.LemonChiffon), CInt(10*decStep),
CInt(10*decStep), CInt(6*decStep), CInt(6*decStep))
bmp.Save(Response.OutputStream, ImageFormat.Gif)
jpg-images (se code below). In both cases, the image-quality is rather poor:
http://dotnet.kensho.dk/scr_diagram.aspx?tal=12&jeg=3&fan=9&san=3&soc=7&kon=2&int=12&fol=5&img=gif
http://dotnet.kensho.dk/scr_diagram.aspx?tal=12&jeg=3&fan=9&san=3&soc=7&kon=2&int=12&fol=5&img=jpg
I would very much like to have clearer images, but I haven't been able
to locate a property that allows me to control the image quality /
compression.
Any ideas?
Thanks In advance,
Kim )
Dim intSize As Integer = 400
Dim decStep As Decimal = intSize/26
Dim bmp As Bitmap = New Bitmap(intSize,intSize)
Dim g As Graphics = Graphics.FromImage(bmp)
g.FillRectangle(New SolidBrush(Color.White), 0, 0, intSize, intSize)
g.FillEllipse(New SolidBrush(Color.Gold), decStep, decStep,
CInt(24*decStep), CInt(24*decStep))
g.FillEllipse(New SolidBrush(Color.Khaki), CInt(4*decStep),
CInt(4*decStep), CInt(18*decStep), CInt(18*decStep))
g.FillEllipse(New SolidBrush(Color.PaleGoldenrod), CInt(7*decStep),
CInt(7*decStep), CInt(12*decStep), CInt(12*decStep))
g.FillEllipse(New SolidBrush(Color.LemonChiffon), CInt(10*decStep),
CInt(10*decStep), CInt(6*decStep), CInt(6*decStep))
bmp.Save(Response.OutputStream, ImageFormat.Gif)