MemoryStream Cast

Discussion in 'ASP .Net' started by =?Utf-8?B?Um9ic29uIENhcnZhbGhvIE1hY2hhZG8=?=, Sep 10, 2004.

  1. Does anyone knows how to CAST this SQL Response into a MemoryStream ??
    When executing below code an error message says "Specified cast is not valid"

    I need to put this into MemoryStream to use it into imgPhoto
    Dim imgPhoto As System.Drawing.Image =
    System.Drawing.Image.FromStream(myStream)

    Dim dbConn, SQLStmt, dbComm, dbRead, img
    Dim myStream 'As New MemoryStream
    dbConn = New
    System.Data.OleDb.OleDbConnection(Application("connection_string"))
    dbConn.Open()
    img = "picture1"
    SQLStmt = "SELECT figura "
    SQLStmt = SQLStmt & "FROM figura_tb "
    SQLStmt = SQLStmt & "Where nome = "
    SQLStmt = SQLStmt & "'"
    SQLStmt = SQLStmt & img
    SQLStmt = SQLStmt & "'"
    dbComm = New System.Data.OleDb.OleDbCommand(SQLStmt, dbConn)
    dbRead = dbComm.ExecuteReader()
    If dbRead.read() Then
    myStream = dbRead("figura")
    End If
     
    =?Utf-8?B?Um9ic29uIENhcnZhbGhvIE1hY2hhZG8=?=, Sep 10, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?Um9ic29uIENhcnZhbGhvIE1hY2hhZG8=?=

    Hermit Dave Guest

    google is your true dear friend...

    Dim con As New System.Data.SqlClient.SqlConnection("data source=mt5;initial
    catalog=master;
    user id=sa;password=mms")
    con.Open()
    Dim cmd As New System.Data.SqlClient.SqlCommand("select * from
    SampleImageTable")
    cmd.Connection = con
    cmd.CommandType = CommandType.Text
    Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    Dim ds As New DataSet()
    da.Fill(ds)
    Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0), Byte())
    Dim memorybits As New MemoryStream(bits)

    http://www.dotnetspider.com/Technology/KBPages/558.aspx

    --

    Regards,

    Hermit Dave
    (http://hdave.blogspot.com)
    "Robson Carvalho Machado" <>
    wrote in message news:...
    > Does anyone knows how to CAST this SQL Response into a MemoryStream ??
    > When executing below code an error message says "Specified cast is not

    valid"
    >
    > I need to put this into MemoryStream to use it into imgPhoto
    > Dim imgPhoto As System.Drawing.Image =
    > System.Drawing.Image.FromStream(myStream)
    >
    > Dim dbConn, SQLStmt, dbComm, dbRead, img
    > Dim myStream 'As New MemoryStream
    > dbConn = New
    > System.Data.OleDb.OleDbConnection(Application("connection_string"))
    > dbConn.Open()
    > img = "picture1"
    > SQLStmt = "SELECT figura "
    > SQLStmt = SQLStmt & "FROM figura_tb "
    > SQLStmt = SQLStmt & "Where nome = "
    > SQLStmt = SQLStmt & "'"
    > SQLStmt = SQLStmt & img
    > SQLStmt = SQLStmt & "'"
    > dbComm = New System.Data.OleDb.OleDbCommand(SQLStmt, dbConn)
    > dbRead = dbComm.ExecuteReader()
    > If dbRead.read() Then
    > myStream = dbRead("figura")
    > End If
     
    Hermit Dave, Sep 10, 2004
    #2
    1. Advertising

  3. Dear Hermit Dave,

    Thanks. It has worked fine.

    But now, I need to solve other problem.
    Using below code I can read transparet gif from SQL but at screen it shows
    transparent area as black. Can you help me?


    Imports System.io
    Public Class teste
    Inherits System.Web.UI.Page

    #Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub
    InitializeComponent()

    End Sub

    'NOTE: The following placeholder declaration is required by the Web Form
    Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Init
    'CODEGEN: This method call is required by the Web Form Designer
    'Do not modify it using the code editor.
    InitializeComponent()
    End Sub

    #End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    ScaleStatic("picture1", 50)
    End Sub
    Public Sub ScaleStatic(ByVal ImageName, ByVal intSize)

    Dim con As New
    System.Data.SqlClient.SqlConnection(Application("connection_string1"))
    con.Open()
    Dim cmd As New System.Data.SqlClient.SqlCommand("select figura from
    figura_tb where nome='" & ImageName & "'")
    cmd.Connection = con
    cmd.CommandType = CommandType.Text
    Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    Dim ds As New DataSet
    da.Fill(ds)
    Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0), Byte())
    Dim myStream As New MemoryStream(bits)

    Dim imgPhoto As System.Drawing.Image =
    System.Drawing.Image.FromStream(myStream)
    Dim sourceWidth As Integer = imgPhoto.Width
    Dim sourceHeight As Integer = imgPhoto.Height
    Dim sourceX As Integer = 0
    Dim sourceY As Integer = 0
    Dim destX As Integer = 0
    Dim destY As Integer = 0
    Dim destWidth As Integer = 0
    Dim destHeight As Integer = 0

    If imgPhoto.Width > imgPhoto.Height Then
    destHeight = ((intSize * 1.0 / sourceWidth) * sourceHeight)
    destWidth = intSize
    Else
    destHeight = intSize
    destWidth = ((intSize * 1.0 / sourceHeight) * sourceWidth)
    End If

    Dim bmPhoto As Bitmap = New Bitmap(destWidth, destHeight,
    imgPhoto.PixelFormat.Format24bppRgb)
    bmPhoto.SetResolution(imgPhoto.HorizontalResolution,
    imgPhoto.VerticalResolution)

    Dim grPhoto As Graphics = Graphics.FromImage(bmPhoto)
    grPhoto.CompositingQuality =
    Drawing.Drawing2D.CompositingQuality.HighQuality
    grPhoto.SmoothingMode = Drawing.Drawing2D.SmoothingMode.HighQuality
    grPhoto.InterpolationMode =
    Drawing.Drawing2D.InterpolationMode.HighQualityBicubic

    grPhoto.DrawImage(imgPhoto, New Rectangle(destX, destY, destWidth,
    destHeight), New Rectangle(sourceX, sourceY, sourceWidth, sourceHeight),
    GraphicsUnit.Pixel)

    bmPhoto.Save(Response.OutputStream,
    System.Drawing.Imaging.ImageFormat.Gif)
    grPhoto.Dispose()
    bmPhoto.Dispose()

    End Sub

    End Class




    "Hermit Dave" wrote:

    > google is your true dear friend...
    >
    > Dim con As New System.Data.SqlClient.SqlConnection("data source=mt5;initial
    > catalog=master;
    > user id=sa;password=mms")
    > con.Open()
    > Dim cmd As New System.Data.SqlClient.SqlCommand("select * from
    > SampleImageTable")
    > cmd.Connection = con
    > cmd.CommandType = CommandType.Text
    > Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    > Dim ds As New DataSet()
    > da.Fill(ds)
    > Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0), Byte())
    > Dim memorybits As New MemoryStream(bits)
    >
    > http://www.dotnetspider.com/Technology/KBPages/558.aspx
    >
    > --
    >
    > Regards,
    >
    > Hermit Dave
    > (http://hdave.blogspot.com)
    > "Robson Carvalho Machado" <>
    > wrote in message news:...
    > > Does anyone knows how to CAST this SQL Response into a MemoryStream ??
    > > When executing below code an error message says "Specified cast is not

    > valid"
    > >
    > > I need to put this into MemoryStream to use it into imgPhoto
    > > Dim imgPhoto As System.Drawing.Image =
    > > System.Drawing.Image.FromStream(myStream)
    > >
    > > Dim dbConn, SQLStmt, dbComm, dbRead, img
    > > Dim myStream 'As New MemoryStream
    > > dbConn = New
    > > System.Data.OleDb.OleDbConnection(Application("connection_string"))
    > > dbConn.Open()
    > > img = "picture1"
    > > SQLStmt = "SELECT figura "
    > > SQLStmt = SQLStmt & "FROM figura_tb "
    > > SQLStmt = SQLStmt & "Where nome = "
    > > SQLStmt = SQLStmt & "'"
    > > SQLStmt = SQLStmt & img
    > > SQLStmt = SQLStmt & "'"
    > > dbComm = New System.Data.OleDb.OleDbCommand(SQLStmt, dbConn)
    > > dbRead = dbComm.ExecuteReader()
    > > If dbRead.read() Then
    > > myStream = dbRead("figura")
    > > End If

    >
    >
    >
     
    =?Utf-8?B?Um9ic29uIENhcnZhbGhvIE1hY2hhZG8=?=, Sep 10, 2004
    #3
  4. =?Utf-8?B?Um9ic29uIENhcnZhbGhvIE1hY2hhZG8=?=

    Hermit Dave Guest

    have a look at this link.. the code is in c# but i gave you the link which
    does the code conversion so play with it.

    http://www.c-sharpcorner.com/Code/2003/March/ThumbnailImages.asp

    http://dotnetjunkies.com/Newsgroups/microsoft.public.dotnet.framework.drawing/2004/3/19/65540.aspx

    --

    Regards,

    Hermit Dave
    (http://hdave.blogspot.com)
    "Robson Carvalho Machado" <>
    wrote in message news:...
    > Dear Hermit Dave,
    >
    > Thanks. It has worked fine.
    >
    > But now, I need to solve other problem.
    > Using below code I can read transparet gif from SQL but at screen it shows
    > transparent area as black. Can you help me?
    >
    >
    > Imports System.io
    > Public Class teste
    > Inherits System.Web.UI.Page
    >
    > #Region " Web Form Designer Generated Code "
    >
    > 'This call is required by the Web Form Designer.
    > <System.Diagnostics.DebuggerStepThrough()> Private Sub
    > InitializeComponent()
    >
    > End Sub
    >
    > 'NOTE: The following placeholder declaration is required by the Web

    Form
    > Designer.
    > 'Do not delete or move it.
    > Private designerPlaceholderDeclaration As System.Object
    >
    > Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    > System.EventArgs) Handles MyBase.Init
    > 'CODEGEN: This method call is required by the Web Form Designer
    > 'Do not modify it using the code editor.
    > InitializeComponent()
    > End Sub
    >
    > #End Region
    >
    > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    > System.EventArgs) Handles MyBase.Load
    > ScaleStatic("picture1", 50)
    > End Sub
    > Public Sub ScaleStatic(ByVal ImageName, ByVal intSize)
    >
    > Dim con As New
    > System.Data.SqlClient.SqlConnection(Application("connection_string1"))
    > con.Open()
    > Dim cmd As New System.Data.SqlClient.SqlCommand("select figura

    from
    > figura_tb where nome='" & ImageName & "'")
    > cmd.Connection = con
    > cmd.CommandType = CommandType.Text
    > Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    > Dim ds As New DataSet
    > da.Fill(ds)
    > Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0), Byte())
    > Dim myStream As New MemoryStream(bits)
    >
    > Dim imgPhoto As System.Drawing.Image =
    > System.Drawing.Image.FromStream(myStream)
    > Dim sourceWidth As Integer = imgPhoto.Width
    > Dim sourceHeight As Integer = imgPhoto.Height
    > Dim sourceX As Integer = 0
    > Dim sourceY As Integer = 0
    > Dim destX As Integer = 0
    > Dim destY As Integer = 0
    > Dim destWidth As Integer = 0
    > Dim destHeight As Integer = 0
    >
    > If imgPhoto.Width > imgPhoto.Height Then
    > destHeight = ((intSize * 1.0 / sourceWidth) * sourceHeight)
    > destWidth = intSize
    > Else
    > destHeight = intSize
    > destWidth = ((intSize * 1.0 / sourceHeight) * sourceWidth)
    > End If
    >
    > Dim bmPhoto As Bitmap = New Bitmap(destWidth, destHeight,
    > imgPhoto.PixelFormat.Format24bppRgb)
    > bmPhoto.SetResolution(imgPhoto.HorizontalResolution,
    > imgPhoto.VerticalResolution)
    >
    > Dim grPhoto As Graphics = Graphics.FromImage(bmPhoto)
    > grPhoto.CompositingQuality =
    > Drawing.Drawing2D.CompositingQuality.HighQuality
    > grPhoto.SmoothingMode =

    Drawing.Drawing2D.SmoothingMode.HighQuality
    > grPhoto.InterpolationMode =
    > Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
    >
    > grPhoto.DrawImage(imgPhoto, New Rectangle(destX, destY, destWidth,
    > destHeight), New Rectangle(sourceX, sourceY, sourceWidth, sourceHeight),
    > GraphicsUnit.Pixel)
    >
    > bmPhoto.Save(Response.OutputStream,
    > System.Drawing.Imaging.ImageFormat.Gif)
    > grPhoto.Dispose()
    > bmPhoto.Dispose()
    >
    > End Sub
    >
    > End Class
    >
    >
    >
    >
    > "Hermit Dave" wrote:
    >
    > > google is your true dear friend...
    > >
    > > Dim con As New System.Data.SqlClient.SqlConnection("data

    source=mt5;initial
    > > catalog=master;
    > > user id=sa;password=mms")
    > > con.Open()
    > > Dim cmd As New System.Data.SqlClient.SqlCommand("select * from
    > > SampleImageTable")
    > > cmd.Connection = con
    > > cmd.CommandType = CommandType.Text
    > > Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    > > Dim ds As New DataSet()
    > > da.Fill(ds)
    > > Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0), Byte())
    > > Dim memorybits As New MemoryStream(bits)
    > >
    > > http://www.dotnetspider.com/Technology/KBPages/558.aspx
    > >
    > > --
    > >
    > > Regards,
    > >
    > > Hermit Dave
    > > (http://hdave.blogspot.com)
    > > "Robson Carvalho Machado"

    <>
    > > wrote in message

    news:...
    > > > Does anyone knows how to CAST this SQL Response into a MemoryStream ??
    > > > When executing below code an error message says "Specified cast is not

    > > valid"
    > > >
    > > > I need to put this into MemoryStream to use it into imgPhoto
    > > > Dim imgPhoto As System.Drawing.Image =
    > > > System.Drawing.Image.FromStream(myStream)
    > > >
    > > > Dim dbConn, SQLStmt, dbComm, dbRead, img
    > > > Dim myStream 'As New MemoryStream
    > > > dbConn = New
    > > > System.Data.OleDb.OleDbConnection(Application("connection_string"))
    > > > dbConn.Open()
    > > > img = "picture1"
    > > > SQLStmt = "SELECT figura "
    > > > SQLStmt = SQLStmt & "FROM figura_tb "
    > > > SQLStmt = SQLStmt & "Where nome = "
    > > > SQLStmt = SQLStmt & "'"
    > > > SQLStmt = SQLStmt & img
    > > > SQLStmt = SQLStmt & "'"
    > > > dbComm = New System.Data.OleDb.OleDbCommand(SQLStmt, dbConn)
    > > > dbRead = dbComm.ExecuteReader()
    > > > If dbRead.read() Then
    > > > myStream = dbRead("figura")
    > > > End If

    > >
    > >
    > >
     
    Hermit Dave, Sep 10, 2004
    #4
  5. =?Utf-8?B?Um9ic29uIENhcnZhbGhvIE1hY2hhZG8=?=

    Cor Ligthert Guest

    Robson,

    Maybe you can use this rather old sample of my. It does not just show an
    image, however you can position the thumbnail nice in a page.

    I hope this helps?

    Cor

    \\\For the database the image database sample from the Resource kit.
    \\\It needs 2 forms with a listbox, a picturebox and a label on form1
    \\\webform1
    Private Sub Page_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles MyBase.Load
    If Not IsPostBack Then
    Dim conn As New SqlClient.SqlConnection _
    ("Server=localhost;" & "DataBase=Northwind;" & _
    "Integrated Security=SSPI")
    Dim da As New SqlClient.SqlDataAdapter _
    ("SELECT FileName, PictureID FROM Picture", conn)
    Dim ds As New DataSet
    Me.Image1.Visible = False
    ListBox1.AutoPostBack = True
    Try
    da.Fill(ds)
    ListBox1.DataSource = ds.Tables(0)
    ListBox1.DataTextField = "FileName"
    ListBox1.DataValueField = "PictureID"
    ListBox1.DataBind()
    Catch sqlExc As SqlClient.SqlException
    Me.Label1.Text = sqlExc.ToString
    Catch exc As Exception
    Me.Label1.Text = exc.ToString
    End Try
    End If
    End Sub
    Private Sub ListBox1_SelectedIndexChanged(ByVal sender _
    As System.Object, ByVal e As System.EventArgs) _
    Handles ListBox1.SelectedIndexChanged
    Session.Item("img") = ListBox1.SelectedItem.Value
    Image1.Visible = True
    Image1.ImageUrl = "http://localhost/WebImage/WebForm2.aspx"
    End Sub
    ///
    \\\Webform1
    Private Sub Page_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles MyBase.Load
    Dim conn As New SqlClient.SqlConnection("Server=localhost;" & _
    "DataBase=Northwind;" & "Integrated Security=SSPI")
    Dim sqlstr As String = _
    String.Format("SELECT Picture FROM Picture WHERE (PictureID = {0})", _
    CInt(Session.Item("img")))
    Dim cmd As New SqlClient.SqlCommand(sqlstr, conn)
    conn.Open()
    Dim rdr As SqlClient.SqlDataReader = cmd.ExecuteReader()
    rdr.Read()
    Dim arrImage() As Byte
    arrImage = (CType(rdr.Item("Picture"), Byte()))
    Dim ms1 As New System.IO.MemoryStream(arrImage)
    Dim origimage As System.drawing.Image
    origimage = System.Drawing.Image.FromStream(ms1)
    Dim PThumbnail As System.drawing.Image
    PThumbnail = origimage.GetThumbnailImage(100, 100, Nothing, New IntPtr)
    Dim ms2 As New System.IO.MemoryStream
    PThumbnail.Save(ms2, Imaging.ImageFormat.Bmp)
    arrImage = ms2.GetBuffer
    Response.BinaryWrite(arrImage)
    rdr.Close()
    conn.Close()
    End Sub
    ///
     
    Cor Ligthert, Sep 11, 2004
    #5
  6. Dear Hermit,

    I'm trying to use this example since sep, 10 and I couldn't adjust my VB
    code using your code.

    Unfortunelly I'm not an expert VB programmer.

    Can you or some other friend help me with below code?

    Regards

    Imports System.io

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    ScaleStatic("assinatura_promocao_1053", 150)
    End Sub

    Public Sub ScaleStatic(ByVal ImageName, ByVal intSize)

    Dim con As New
    System.Data.SqlClient.SqlConnection(Application("connection_string1"))
    con.Open()
    Dim cmd As New System.Data.SqlClient.SqlCommand("select figura from
    figura_tb where nome='" & ImageName & "'")
    cmd.Connection = con
    cmd.CommandType = CommandType.Text
    Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    Dim ds As New DataSet
    da.Fill(ds)
    Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0), Byte())
    Dim myStream As New MemoryStream(bits)

    Dim imgPhoto As System.Drawing.Image =
    System.Drawing.Image.FromStream(myStream)
    Dim sourceWidth As Integer = imgPhoto.Width
    Dim sourceHeight As Integer = imgPhoto.Height
    Dim sourceX As Integer = 0
    Dim sourceY As Integer = 0
    Dim destX As Integer = 0
    Dim destY As Integer = 0
    Dim destWidth As Integer = 0
    Dim destHeight As Integer = 0

    If imgPhoto.Width > imgPhoto.Height Then
    destHeight = ((intSize * 1.0 / sourceWidth) * sourceHeight)
    destWidth = intSize
    Else
    destHeight = intSize
    destWidth = ((intSize * 1.0 / sourceHeight) * sourceWidth)
    End If

    Dim bmPhoto As Bitmap = New Bitmap(destWidth, destHeight,
    imgPhoto.PixelFormat.Format24bppRgb)
    bmPhoto.SetResolution(imgPhoto.HorizontalResolution,
    imgPhoto.VerticalResolution)

    Dim grPhoto As Graphics = Graphics.FromImage(bmPhoto)
    grPhoto.CompositingQuality =
    Drawing.Drawing2D.CompositingQuality.HighQuality
    grPhoto.SmoothingMode = Drawing.Drawing2D.SmoothingMode.HighQuality
    grPhoto.InterpolationMode =
    Drawing.Drawing2D.InterpolationMode.HighQualityBicubic

    grPhoto.DrawImage(imgPhoto, New Rectangle(destX, destY, destWidth,
    destHeight), New Rectangle(sourceX, sourceY, sourceWidth, sourceHeight),
    GraphicsUnit.Pixel)

    bmPhoto.Save(Response.OutputStream,
    System.Drawing.Imaging.ImageFormat.Gif)
    grPhoto.Dispose()
    bmPhoto.Dispose()

    End Sub

    "Hermit Dave" wrote:

    > have a look at this link.. the code is in c# but i gave you the link which
    > does the code conversion so play with it.
    >
    > http://www.c-sharpcorner.com/Code/2003/March/ThumbnailImages.asp
    >
    > http://dotnetjunkies.com/Newsgroups/microsoft.public.dotnet.framework.drawing/2004/3/19/65540.aspx
    >
    > --
    >
    > Regards,
    >
    > Hermit Dave
    > (http://hdave.blogspot.com)
    > "Robson Carvalho Machado" <>
    > wrote in message news:...
    > > Dear Hermit Dave,
    > >
    > > Thanks. It has worked fine.
    > >
    > > But now, I need to solve other problem.
    > > Using below code I can read transparet gif from SQL but at screen it shows
    > > transparent area as black. Can you help me?
    > >
    > >
    > > Imports System.io
    > > Public Class teste
    > > Inherits System.Web.UI.Page
    > >
    > > #Region " Web Form Designer Generated Code "
    > >
    > > 'This call is required by the Web Form Designer.
    > > <System.Diagnostics.DebuggerStepThrough()> Private Sub
    > > InitializeComponent()
    > >
    > > End Sub
    > >
    > > 'NOTE: The following placeholder declaration is required by the Web

    > Form
    > > Designer.
    > > 'Do not delete or move it.
    > > Private designerPlaceholderDeclaration As System.Object
    > >
    > > Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    > > System.EventArgs) Handles MyBase.Init
    > > 'CODEGEN: This method call is required by the Web Form Designer
    > > 'Do not modify it using the code editor.
    > > InitializeComponent()
    > > End Sub
    > >
    > > #End Region
    > >
    > > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    > > System.EventArgs) Handles MyBase.Load
    > > ScaleStatic("picture1", 50)
    > > End Sub
    > > Public Sub ScaleStatic(ByVal ImageName, ByVal intSize)
    > >
    > > Dim con As New
    > > System.Data.SqlClient.SqlConnection(Application("connection_string1"))
    > > con.Open()
    > > Dim cmd As New System.Data.SqlClient.SqlCommand("select figura

    > from
    > > figura_tb where nome='" & ImageName & "'")
    > > cmd.Connection = con
    > > cmd.CommandType = CommandType.Text
    > > Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    > > Dim ds As New DataSet
    > > da.Fill(ds)
    > > Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0), Byte())
    > > Dim myStream As New MemoryStream(bits)
    > >
    > > Dim imgPhoto As System.Drawing.Image =
    > > System.Drawing.Image.FromStream(myStream)
    > > Dim sourceWidth As Integer = imgPhoto.Width
    > > Dim sourceHeight As Integer = imgPhoto.Height
    > > Dim sourceX As Integer = 0
    > > Dim sourceY As Integer = 0
    > > Dim destX As Integer = 0
    > > Dim destY As Integer = 0
    > > Dim destWidth As Integer = 0
    > > Dim destHeight As Integer = 0
    > >
    > > If imgPhoto.Width > imgPhoto.Height Then
    > > destHeight = ((intSize * 1.0 / sourceWidth) * sourceHeight)
    > > destWidth = intSize
    > > Else
    > > destHeight = intSize
    > > destWidth = ((intSize * 1.0 / sourceHeight) * sourceWidth)
    > > End If
    > >
    > > Dim bmPhoto As Bitmap = New Bitmap(destWidth, destHeight,
    > > imgPhoto.PixelFormat.Format24bppRgb)
    > > bmPhoto.SetResolution(imgPhoto.HorizontalResolution,
    > > imgPhoto.VerticalResolution)
    > >
    > > Dim grPhoto As Graphics = Graphics.FromImage(bmPhoto)
    > > grPhoto.CompositingQuality =
    > > Drawing.Drawing2D.CompositingQuality.HighQuality
    > > grPhoto.SmoothingMode =

    > Drawing.Drawing2D.SmoothingMode.HighQuality
    > > grPhoto.InterpolationMode =
    > > Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
    > >
    > > grPhoto.DrawImage(imgPhoto, New Rectangle(destX, destY, destWidth,
    > > destHeight), New Rectangle(sourceX, sourceY, sourceWidth, sourceHeight),
    > > GraphicsUnit.Pixel)
    > >
    > > bmPhoto.Save(Response.OutputStream,
    > > System.Drawing.Imaging.ImageFormat.Gif)
    > > grPhoto.Dispose()
    > > bmPhoto.Dispose()
    > >
    > > End Sub
    > >
    > > End Class
    > >
    > >
    > >
    > >
    > > "Hermit Dave" wrote:
    > >
    > > > google is your true dear friend...
    > > >
    > > > Dim con As New System.Data.SqlClient.SqlConnection("data

    > source=mt5;initial
    > > > catalog=master;
    > > > user id=sa;password=mms")
    > > > con.Open()
    > > > Dim cmd As New System.Data.SqlClient.SqlCommand("select * from
    > > > SampleImageTable")
    > > > cmd.Connection = con
    > > > cmd.CommandType = CommandType.Text
    > > > Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    > > > Dim ds As New DataSet()
    > > > da.Fill(ds)
    > > > Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0), Byte())
    > > > Dim memorybits As New MemoryStream(bits)
    > > >
    > > > http://www.dotnetspider.com/Technology/KBPages/558.aspx
    > > >
    > > > --
    > > >
    > > > Regards,
    > > >
    > > > Hermit Dave
    > > > (http://hdave.blogspot.com)
    > > > "Robson Carvalho Machado"

    > <>
    > > > wrote in message

    > news:...
    > > > > Does anyone knows how to CAST this SQL Response into a MemoryStream ??
    > > > > When executing below code an error message says "Specified cast is not
    > > > valid"
    > > > >
    > > > > I need to put this into MemoryStream to use it into imgPhoto
    > > > > Dim imgPhoto As System.Drawing.Image =
    > > > > System.Drawing.Image.FromStream(myStream)
    > > > >
    > > > > Dim dbConn, SQLStmt, dbComm, dbRead, img
    > > > > Dim myStream 'As New MemoryStream
    > > > > dbConn = New
    > > > > System.Data.OleDb.OleDbConnection(Application("connection_string"))
    > > > > dbConn.Open()
    > > > > img = "picture1"
    > > > > SQLStmt = "SELECT figura "
    > > > > SQLStmt = SQLStmt & "FROM figura_tb "
    > > > > SQLStmt = SQLStmt & "Where nome = "
    > > > > SQLStmt = SQLStmt & "'"
    > > > > SQLStmt = SQLStmt & img
    > > > > SQLStmt = SQLStmt & "'"
    > > > > dbComm = New System.Data.OleDb.OleDbCommand(SQLStmt, dbConn)
    > > > > dbRead = dbComm.ExecuteReader()
    > > > > If dbRead.read() Then
    > > > > myStream = dbRead("figura")
    > > > > End If
    > > >
    > > >
    > > >

    >
    >
    >
     
    =?Utf-8?B?Um9ic29uIENhcnZhbGhvIE1hY2hhZG8=?=, Sep 21, 2004
    #6
  7. Dear Cor Ligthert,

    Unfortunelly your example returns the same Color pallet problems when I try
    to use transparent GIF. Transparent area shows itself as black and with other
    GIFs color quality always degrade.

    Can you help me with my original below code?

    Regards
    Robson Machado

    Imports System.io

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    ScaleStatic("assinatura_promocao_1053", 150)
    End Sub
    Public Sub ScaleStatic(ByVal ImageName, ByVal intSize)

    Dim con As New
    System.Data.SqlClient.SqlConnection(Application("connection_string1"))
    con.Open()
    Dim cmd As New System.Data.SqlClient.SqlCommand("select figura from
    figura_tb where nome='" & ImageName & "'")
    cmd.Connection = con
    cmd.CommandType = CommandType.Text
    Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    Dim ds As New DataSet
    da.Fill(ds)
    Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0), Byte())
    Dim myStream As New MemoryStream(bits)

    Dim imgPhoto As System.Drawing.Image =
    System.Drawing.Image.FromStream(myStream)
    Dim sourceWidth As Integer = imgPhoto.Width
    Dim sourceHeight As Integer = imgPhoto.Height
    Dim sourceX As Integer = 0
    Dim sourceY As Integer = 0
    Dim destX As Integer = 0
    Dim destY As Integer = 0
    Dim destWidth As Integer = 0
    Dim destHeight As Integer = 0

    If imgPhoto.Width > imgPhoto.Height Then
    destHeight = ((intSize * 1.0 / sourceWidth) * sourceHeight)
    destWidth = intSize
    Else
    destHeight = intSize
    destWidth = ((intSize * 1.0 / sourceHeight) * sourceWidth)
    End If

    Dim bmPhoto As Bitmap = New Bitmap(destWidth, destHeight,
    imgPhoto.PixelFormat.Format24bppRgb)
    bmPhoto.SetResolution(imgPhoto.HorizontalResolution,
    imgPhoto.VerticalResolution)

    Dim grPhoto As Graphics = Graphics.FromImage(bmPhoto)
    grPhoto.CompositingQuality =
    Drawing.Drawing2D.CompositingQuality.HighQuality
    grPhoto.SmoothingMode = Drawing.Drawing2D.SmoothingMode.HighQuality
    grPhoto.InterpolationMode =
    Drawing.Drawing2D.InterpolationMode.HighQualityBicubic

    grPhoto.DrawImage(imgPhoto, New Rectangle(destX, destY, destWidth,
    destHeight), New Rectangle(sourceX, sourceY, sourceWidth, sourceHeight),
    GraphicsUnit.Pixel)

    bmPhoto.Save(Response.OutputStream,
    System.Drawing.Imaging.ImageFormat.Gif)
    grPhoto.Dispose()
    bmPhoto.Dispose()

    End Sub



    "Cor Ligthert" wrote:

    > Robson,
    >
    > Maybe you can use this rather old sample of my. It does not just show an
    > image, however you can position the thumbnail nice in a page.
    >
    > I hope this helps?
    >
    > Cor
    >
    > \\\For the database the image database sample from the Resource kit.
    > \\\It needs 2 forms with a listbox, a picturebox and a label on form1
    > \\\webform1
    > Private Sub Page_Load(ByVal sender As System.Object, _
    > ByVal e As System.EventArgs) Handles MyBase.Load
    > If Not IsPostBack Then
    > Dim conn As New SqlClient.SqlConnection _
    > ("Server=localhost;" & "DataBase=Northwind;" & _
    > "Integrated Security=SSPI")
    > Dim da As New SqlClient.SqlDataAdapter _
    > ("SELECT FileName, PictureID FROM Picture", conn)
    > Dim ds As New DataSet
    > Me.Image1.Visible = False
    > ListBox1.AutoPostBack = True
    > Try
    > da.Fill(ds)
    > ListBox1.DataSource = ds.Tables(0)
    > ListBox1.DataTextField = "FileName"
    > ListBox1.DataValueField = "PictureID"
    > ListBox1.DataBind()
    > Catch sqlExc As SqlClient.SqlException
    > Me.Label1.Text = sqlExc.ToString
    > Catch exc As Exception
    > Me.Label1.Text = exc.ToString
    > End Try
    > End If
    > End Sub
    > Private Sub ListBox1_SelectedIndexChanged(ByVal sender _
    > As System.Object, ByVal e As System.EventArgs) _
    > Handles ListBox1.SelectedIndexChanged
    > Session.Item("img") = ListBox1.SelectedItem.Value
    > Image1.Visible = True
    > Image1.ImageUrl = "http://localhost/WebImage/WebForm2.aspx"
    > End Sub
    > ///
    > \\\Webform1
    > Private Sub Page_Load(ByVal sender As System.Object, _
    > ByVal e As System.EventArgs) Handles MyBase.Load
    > Dim conn As New SqlClient.SqlConnection("Server=localhost;" & _
    > "DataBase=Northwind;" & "Integrated Security=SSPI")
    > Dim sqlstr As String = _
    > String.Format("SELECT Picture FROM Picture WHERE (PictureID = {0})", _
    > CInt(Session.Item("img")))
    > Dim cmd As New SqlClient.SqlCommand(sqlstr, conn)
    > conn.Open()
    > Dim rdr As SqlClient.SqlDataReader = cmd.ExecuteReader()
    > rdr.Read()
    > Dim arrImage() As Byte
    > arrImage = (CType(rdr.Item("Picture"), Byte()))
    > Dim ms1 As New System.IO.MemoryStream(arrImage)
    > Dim origimage As System.drawing.Image
    > origimage = System.Drawing.Image.FromStream(ms1)
    > Dim PThumbnail As System.drawing.Image
    > PThumbnail = origimage.GetThumbnailImage(100, 100, Nothing, New IntPtr)
    > Dim ms2 As New System.IO.MemoryStream
    > PThumbnail.Save(ms2, Imaging.ImageFormat.Bmp)
    > arrImage = ms2.GetBuffer
    > Response.BinaryWrite(arrImage)
    > rdr.Close()
    > conn.Close()
    > End Sub
    > ///
    >
    >
    >
     
    =?Utf-8?B?Um9ic29uIENhcnZhbGhvIE1hY2hhZG8=?=, Sep 21, 2004
    #7
  8. =?Utf-8?B?Um9ic29uIENhcnZhbGhvIE1hY2hhZG8=?=

    Hermit Dave Guest

    i will have a look at it... i was under the impression that you had it
    working only that you couldnt get transparent gifs anymore !!
    is that correct ?

    --

    Regards,

    Hermit Dave
    (http://hdave.blogspot.com)
    "Robson Carvalho Machado" <>
    wrote in message news:...
    > Dear Hermit,
    >
    > I'm trying to use this example since sep, 10 and I couldn't adjust my VB
    > code using your code.
    >
    > Unfortunelly I'm not an expert VB programmer.
    >
    > Can you or some other friend help me with below code?
    >
    > Regards
    >
    > Imports System.io
    >
    > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    > System.EventArgs) Handles MyBase.Load
    > ScaleStatic("assinatura_promocao_1053", 150)
    > End Sub
    >
    > Public Sub ScaleStatic(ByVal ImageName, ByVal intSize)
    >
    > Dim con As New
    > System.Data.SqlClient.SqlConnection(Application("connection_string1"))
    > con.Open()
    > Dim cmd As New System.Data.SqlClient.SqlCommand("select figura from
    > figura_tb where nome='" & ImageName & "'")
    > cmd.Connection = con
    > cmd.CommandType = CommandType.Text
    > Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    > Dim ds As New DataSet
    > da.Fill(ds)
    > Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0), Byte())
    > Dim myStream As New MemoryStream(bits)
    >
    > Dim imgPhoto As System.Drawing.Image =
    > System.Drawing.Image.FromStream(myStream)
    > Dim sourceWidth As Integer = imgPhoto.Width
    > Dim sourceHeight As Integer = imgPhoto.Height
    > Dim sourceX As Integer = 0
    > Dim sourceY As Integer = 0
    > Dim destX As Integer = 0
    > Dim destY As Integer = 0
    > Dim destWidth As Integer = 0
    > Dim destHeight As Integer = 0
    >
    > If imgPhoto.Width > imgPhoto.Height Then
    > destHeight = ((intSize * 1.0 / sourceWidth) * sourceHeight)
    > destWidth = intSize
    > Else
    > destHeight = intSize
    > destWidth = ((intSize * 1.0 / sourceHeight) * sourceWidth)
    > End If
    >
    > Dim bmPhoto As Bitmap = New Bitmap(destWidth, destHeight,
    > imgPhoto.PixelFormat.Format24bppRgb)
    > bmPhoto.SetResolution(imgPhoto.HorizontalResolution,
    > imgPhoto.VerticalResolution)
    >
    > Dim grPhoto As Graphics = Graphics.FromImage(bmPhoto)
    > grPhoto.CompositingQuality =
    > Drawing.Drawing2D.CompositingQuality.HighQuality
    > grPhoto.SmoothingMode = Drawing.Drawing2D.SmoothingMode.HighQuality
    > grPhoto.InterpolationMode =
    > Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
    >
    > grPhoto.DrawImage(imgPhoto, New Rectangle(destX, destY, destWidth,
    > destHeight), New Rectangle(sourceX, sourceY, sourceWidth, sourceHeight),
    > GraphicsUnit.Pixel)
    >
    > bmPhoto.Save(Response.OutputStream,
    > System.Drawing.Imaging.ImageFormat.Gif)
    > grPhoto.Dispose()
    > bmPhoto.Dispose()
    >
    > End Sub
    >
    > "Hermit Dave" wrote:
    >
    >> have a look at this link.. the code is in c# but i gave you the link
    >> which
    >> does the code conversion so play with it.
    >>
    >> http://www.c-sharpcorner.com/Code/2003/March/ThumbnailImages.asp
    >>
    >> http://dotnetjunkies.com/Newsgroups/microsoft.public.dotnet.framework.drawing/2004/3/19/65540.aspx
    >>
    >> --
    >>
    >> Regards,
    >>
    >> Hermit Dave
    >> (http://hdave.blogspot.com)
    >> "Robson Carvalho Machado"
    >> <>
    >> wrote in message
    >> news:...
    >> > Dear Hermit Dave,
    >> >
    >> > Thanks. It has worked fine.
    >> >
    >> > But now, I need to solve other problem.
    >> > Using below code I can read transparet gif from SQL but at screen it
    >> > shows
    >> > transparent area as black. Can you help me?
    >> >
    >> >
    >> > Imports System.io
    >> > Public Class teste
    >> > Inherits System.Web.UI.Page
    >> >
    >> > #Region " Web Form Designer Generated Code "
    >> >
    >> > 'This call is required by the Web Form Designer.
    >> > <System.Diagnostics.DebuggerStepThrough()> Private Sub
    >> > InitializeComponent()
    >> >
    >> > End Sub
    >> >
    >> > 'NOTE: The following placeholder declaration is required by the Web

    >> Form
    >> > Designer.
    >> > 'Do not delete or move it.
    >> > Private designerPlaceholderDeclaration As System.Object
    >> >
    >> > Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    >> > System.EventArgs) Handles MyBase.Init
    >> > 'CODEGEN: This method call is required by the Web Form Designer
    >> > 'Do not modify it using the code editor.
    >> > InitializeComponent()
    >> > End Sub
    >> >
    >> > #End Region
    >> >
    >> > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    >> > System.EventArgs) Handles MyBase.Load
    >> > ScaleStatic("picture1", 50)
    >> > End Sub
    >> > Public Sub ScaleStatic(ByVal ImageName, ByVal intSize)
    >> >
    >> > Dim con As New
    >> > System.Data.SqlClient.SqlConnection(Application("connection_string1"))
    >> > con.Open()
    >> > Dim cmd As New System.Data.SqlClient.SqlCommand("select figura

    >> from
    >> > figura_tb where nome='" & ImageName & "'")
    >> > cmd.Connection = con
    >> > cmd.CommandType = CommandType.Text
    >> > Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    >> > Dim ds As New DataSet
    >> > da.Fill(ds)
    >> > Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0),
    >> > Byte())
    >> > Dim myStream As New MemoryStream(bits)
    >> >
    >> > Dim imgPhoto As System.Drawing.Image =
    >> > System.Drawing.Image.FromStream(myStream)
    >> > Dim sourceWidth As Integer = imgPhoto.Width
    >> > Dim sourceHeight As Integer = imgPhoto.Height
    >> > Dim sourceX As Integer = 0
    >> > Dim sourceY As Integer = 0
    >> > Dim destX As Integer = 0
    >> > Dim destY As Integer = 0
    >> > Dim destWidth As Integer = 0
    >> > Dim destHeight As Integer = 0
    >> >
    >> > If imgPhoto.Width > imgPhoto.Height Then
    >> > destHeight = ((intSize * 1.0 / sourceWidth) * sourceHeight)
    >> > destWidth = intSize
    >> > Else
    >> > destHeight = intSize
    >> > destWidth = ((intSize * 1.0 / sourceHeight) * sourceWidth)
    >> > End If
    >> >
    >> > Dim bmPhoto As Bitmap = New Bitmap(destWidth, destHeight,
    >> > imgPhoto.PixelFormat.Format24bppRgb)
    >> > bmPhoto.SetResolution(imgPhoto.HorizontalResolution,
    >> > imgPhoto.VerticalResolution)
    >> >
    >> > Dim grPhoto As Graphics = Graphics.FromImage(bmPhoto)
    >> > grPhoto.CompositingQuality =
    >> > Drawing.Drawing2D.CompositingQuality.HighQuality
    >> > grPhoto.SmoothingMode =

    >> Drawing.Drawing2D.SmoothingMode.HighQuality
    >> > grPhoto.InterpolationMode =
    >> > Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
    >> >
    >> > grPhoto.DrawImage(imgPhoto, New Rectangle(destX, destY,
    >> > destWidth,
    >> > destHeight), New Rectangle(sourceX, sourceY, sourceWidth,
    >> > sourceHeight),
    >> > GraphicsUnit.Pixel)
    >> >
    >> > bmPhoto.Save(Response.OutputStream,
    >> > System.Drawing.Imaging.ImageFormat.Gif)
    >> > grPhoto.Dispose()
    >> > bmPhoto.Dispose()
    >> >
    >> > End Sub
    >> >
    >> > End Class
    >> >
    >> >
    >> >
    >> >
    >> > "Hermit Dave" wrote:
    >> >
    >> > > google is your true dear friend...
    >> > >
    >> > > Dim con As New System.Data.SqlClient.SqlConnection("data

    >> source=mt5;initial
    >> > > catalog=master;
    >> > > user id=sa;password=mms")
    >> > > con.Open()
    >> > > Dim cmd As New System.Data.SqlClient.SqlCommand("select * from
    >> > > SampleImageTable")
    >> > > cmd.Connection = con
    >> > > cmd.CommandType = CommandType.Text
    >> > > Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    >> > > Dim ds As New DataSet()
    >> > > da.Fill(ds)
    >> > > Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0), Byte())
    >> > > Dim memorybits As New MemoryStream(bits)
    >> > >
    >> > > http://www.dotnetspider.com/Technology/KBPages/558.aspx
    >> > >
    >> > > --
    >> > >
    >> > > Regards,
    >> > >
    >> > > Hermit Dave
    >> > > (http://hdave.blogspot.com)
    >> > > "Robson Carvalho Machado"

    >> <>
    >> > > wrote in message

    >> news:...
    >> > > > Does anyone knows how to CAST this SQL Response into a MemoryStream
    >> > > > ??
    >> > > > When executing below code an error message says "Specified cast is
    >> > > > not
    >> > > valid"
    >> > > >
    >> > > > I need to put this into MemoryStream to use it into imgPhoto
    >> > > > Dim imgPhoto As System.Drawing.Image =
    >> > > > System.Drawing.Image.FromStream(myStream)
    >> > > >
    >> > > > Dim dbConn, SQLStmt, dbComm, dbRead, img
    >> > > > Dim myStream 'As New MemoryStream
    >> > > > dbConn = New
    >> > > > System.Data.OleDb.OleDbConnection(Application("connection_string"))
    >> > > > dbConn.Open()
    >> > > > img = "picture1"
    >> > > > SQLStmt = "SELECT figura "
    >> > > > SQLStmt = SQLStmt & "FROM figura_tb "
    >> > > > SQLStmt = SQLStmt & "Where nome = "
    >> > > > SQLStmt = SQLStmt & "'"
    >> > > > SQLStmt = SQLStmt & img
    >> > > > SQLStmt = SQLStmt & "'"
    >> > > > dbComm = New System.Data.OleDb.OleDbCommand(SQLStmt,
    >> > > > dbConn)
    >> > > > dbRead = dbComm.ExecuteReader()
    >> > > > If dbRead.read() Then
    >> > > > myStream = dbRead("figura")
    >> > > > End If
    >> > >
    >> > >
    >> > >

    >>
    >>
    >>
     
    Hermit Dave, Sep 22, 2004
    #8
  9. Yes, I can't get transparent gifs but theres ono more thing that is related
    to the same problem.
    Any gifs are showed with poor quality because the color palet is not the
    standard use by jpeg.

    Thanks for your help.
    I'll wait for your answer

    Regards.
    Robson Machado

    "Hermit Dave" wrote:

    > i will have a look at it... i was under the impression that you had it
    > working only that you couldnt get transparent gifs anymore !!
    > is that correct ?
    >
    > --
    >
    > Regards,
    >
    > Hermit Dave
    > (http://hdave.blogspot.com)
    > "Robson Carvalho Machado" <>
    > wrote in message news:...
    > > Dear Hermit,
    > >
    > > I'm trying to use this example since sep, 10 and I couldn't adjust my VB
    > > code using your code.
    > >
    > > Unfortunelly I'm not an expert VB programmer.
    > >
    > > Can you or some other friend help me with below code?
    > >
    > > Regards
    > >
    > > Imports System.io
    > >
    > > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    > > System.EventArgs) Handles MyBase.Load
    > > ScaleStatic("assinatura_promocao_1053", 150)
    > > End Sub
    > >
    > > Public Sub ScaleStatic(ByVal ImageName, ByVal intSize)
    > >
    > > Dim con As New
    > > System.Data.SqlClient.SqlConnection(Application("connection_string1"))
    > > con.Open()
    > > Dim cmd As New System.Data.SqlClient.SqlCommand("select figura from
    > > figura_tb where nome='" & ImageName & "'")
    > > cmd.Connection = con
    > > cmd.CommandType = CommandType.Text
    > > Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    > > Dim ds As New DataSet
    > > da.Fill(ds)
    > > Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0), Byte())
    > > Dim myStream As New MemoryStream(bits)
    > >
    > > Dim imgPhoto As System.Drawing.Image =
    > > System.Drawing.Image.FromStream(myStream)
    > > Dim sourceWidth As Integer = imgPhoto.Width
    > > Dim sourceHeight As Integer = imgPhoto.Height
    > > Dim sourceX As Integer = 0
    > > Dim sourceY As Integer = 0
    > > Dim destX As Integer = 0
    > > Dim destY As Integer = 0
    > > Dim destWidth As Integer = 0
    > > Dim destHeight As Integer = 0
    > >
    > > If imgPhoto.Width > imgPhoto.Height Then
    > > destHeight = ((intSize * 1.0 / sourceWidth) * sourceHeight)
    > > destWidth = intSize
    > > Else
    > > destHeight = intSize
    > > destWidth = ((intSize * 1.0 / sourceHeight) * sourceWidth)
    > > End If
    > >
    > > Dim bmPhoto As Bitmap = New Bitmap(destWidth, destHeight,
    > > imgPhoto.PixelFormat.Format24bppRgb)
    > > bmPhoto.SetResolution(imgPhoto.HorizontalResolution,
    > > imgPhoto.VerticalResolution)
    > >
    > > Dim grPhoto As Graphics = Graphics.FromImage(bmPhoto)
    > > grPhoto.CompositingQuality =
    > > Drawing.Drawing2D.CompositingQuality.HighQuality
    > > grPhoto.SmoothingMode = Drawing.Drawing2D.SmoothingMode.HighQuality
    > > grPhoto.InterpolationMode =
    > > Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
    > >
    > > grPhoto.DrawImage(imgPhoto, New Rectangle(destX, destY, destWidth,
    > > destHeight), New Rectangle(sourceX, sourceY, sourceWidth, sourceHeight),
    > > GraphicsUnit.Pixel)
    > >
    > > bmPhoto.Save(Response.OutputStream,
    > > System.Drawing.Imaging.ImageFormat.Gif)
    > > grPhoto.Dispose()
    > > bmPhoto.Dispose()
    > >
    > > End Sub
    > >
    > > "Hermit Dave" wrote:
    > >
    > >> have a look at this link.. the code is in c# but i gave you the link
    > >> which
    > >> does the code conversion so play with it.
    > >>
    > >> http://www.c-sharpcorner.com/Code/2003/March/ThumbnailImages.asp
    > >>
    > >> http://dotnetjunkies.com/Newsgroups/microsoft.public.dotnet.framework.drawing/2004/3/19/65540.aspx
    > >>
    > >> --
    > >>
    > >> Regards,
    > >>
    > >> Hermit Dave
    > >> (http://hdave.blogspot.com)
    > >> "Robson Carvalho Machado"
    > >> <>
    > >> wrote in message
    > >> news:...
    > >> > Dear Hermit Dave,
    > >> >
    > >> > Thanks. It has worked fine.
    > >> >
    > >> > But now, I need to solve other problem.
    > >> > Using below code I can read transparet gif from SQL but at screen it
    > >> > shows
    > >> > transparent area as black. Can you help me?
    > >> >
    > >> >
    > >> > Imports System.io
    > >> > Public Class teste
    > >> > Inherits System.Web.UI.Page
    > >> >
    > >> > #Region " Web Form Designer Generated Code "
    > >> >
    > >> > 'This call is required by the Web Form Designer.
    > >> > <System.Diagnostics.DebuggerStepThrough()> Private Sub
    > >> > InitializeComponent()
    > >> >
    > >> > End Sub
    > >> >
    > >> > 'NOTE: The following placeholder declaration is required by the Web
    > >> Form
    > >> > Designer.
    > >> > 'Do not delete or move it.
    > >> > Private designerPlaceholderDeclaration As System.Object
    > >> >
    > >> > Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    > >> > System.EventArgs) Handles MyBase.Init
    > >> > 'CODEGEN: This method call is required by the Web Form Designer
    > >> > 'Do not modify it using the code editor.
    > >> > InitializeComponent()
    > >> > End Sub
    > >> >
    > >> > #End Region
    > >> >
    > >> > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    > >> > System.EventArgs) Handles MyBase.Load
    > >> > ScaleStatic("picture1", 50)
    > >> > End Sub
    > >> > Public Sub ScaleStatic(ByVal ImageName, ByVal intSize)
    > >> >
    > >> > Dim con As New
    > >> > System.Data.SqlClient.SqlConnection(Application("connection_string1"))
    > >> > con.Open()
    > >> > Dim cmd As New System.Data.SqlClient.SqlCommand("select figura
    > >> from
    > >> > figura_tb where nome='" & ImageName & "'")
    > >> > cmd.Connection = con
    > >> > cmd.CommandType = CommandType.Text
    > >> > Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    > >> > Dim ds As New DataSet
    > >> > da.Fill(ds)
    > >> > Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0),
    > >> > Byte())
    > >> > Dim myStream As New MemoryStream(bits)
    > >> >
    > >> > Dim imgPhoto As System.Drawing.Image =
    > >> > System.Drawing.Image.FromStream(myStream)
    > >> > Dim sourceWidth As Integer = imgPhoto.Width
    > >> > Dim sourceHeight As Integer = imgPhoto.Height
    > >> > Dim sourceX As Integer = 0
    > >> > Dim sourceY As Integer = 0
    > >> > Dim destX As Integer = 0
    > >> > Dim destY As Integer = 0
    > >> > Dim destWidth As Integer = 0
    > >> > Dim destHeight As Integer = 0
    > >> >
    > >> > If imgPhoto.Width > imgPhoto.Height Then
    > >> > destHeight = ((intSize * 1.0 / sourceWidth) * sourceHeight)
    > >> > destWidth = intSize
    > >> > Else
    > >> > destHeight = intSize
    > >> > destWidth = ((intSize * 1.0 / sourceHeight) * sourceWidth)
    > >> > End If
    > >> >
    > >> > Dim bmPhoto As Bitmap = New Bitmap(destWidth, destHeight,
    > >> > imgPhoto.PixelFormat.Format24bppRgb)
    > >> > bmPhoto.SetResolution(imgPhoto.HorizontalResolution,
    > >> > imgPhoto.VerticalResolution)
    > >> >
    > >> > Dim grPhoto As Graphics = Graphics.FromImage(bmPhoto)
    > >> > grPhoto.CompositingQuality =
    > >> > Drawing.Drawing2D.CompositingQuality.HighQuality
    > >> > grPhoto.SmoothingMode =
    > >> Drawing.Drawing2D.SmoothingMode.HighQuality
    > >> > grPhoto.InterpolationMode =
    > >> > Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
    > >> >
    > >> > grPhoto.DrawImage(imgPhoto, New Rectangle(destX, destY,
    > >> > destWidth,
    > >> > destHeight), New Rectangle(sourceX, sourceY, sourceWidth,
    > >> > sourceHeight),
    > >> > GraphicsUnit.Pixel)
    > >> >
    > >> > bmPhoto.Save(Response.OutputStream,
    > >> > System.Drawing.Imaging.ImageFormat.Gif)
    > >> > grPhoto.Dispose()
    > >> > bmPhoto.Dispose()
    > >> >
    > >> > End Sub
    > >> >
    > >> > End Class
    > >> >
    > >> >
    > >> >
    > >> >
    > >> > "Hermit Dave" wrote:
    > >> >
    > >> > > google is your true dear friend...
    > >> > >
    > >> > > Dim con As New System.Data.SqlClient.SqlConnection("data
    > >> source=mt5;initial
    > >> > > catalog=master;
    > >> > > user id=sa;password=mms")
    > >> > > con.Open()
    > >> > > Dim cmd As New System.Data.SqlClient.SqlCommand("select * from
    > >> > > SampleImageTable")
    > >> > > cmd.Connection = con
    > >> > > cmd.CommandType = CommandType.Text
    > >> > > Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    > >> > > Dim ds As New DataSet()
    > >> > > da.Fill(ds)
    > >> > > Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0), Byte())
    > >> > > Dim memorybits As New MemoryStream(bits)
    > >> > >
    > >> > > http://www.dotnetspider.com/Technology/KBPages/558.aspx
    > >> > >
    > >> > > --
    > >> > >
    > >> > > Regards,
    > >> > >
    > >> > > Hermit Dave
    > >> > > (http://hdave.blogspot.com)
    > >> > > "Robson Carvalho Machado"
    > >> <>
    > >> > > wrote in message
    > >> news:...
    > >> > > > Does anyone knows how to CAST this SQL Response into a MemoryStream
    > >> > > > ??
    > >> > > > When executing below code an error message says "Specified cast is
    > >> > > > not
    > >> > > valid"
    > >> > > >
    > >> > > > I need to put this into MemoryStream to use it into imgPhoto
    > >> > > > Dim imgPhoto As System.Drawing.Image =
    > >> > > > System.Drawing.Image.FromStream(myStream)
    > >> > > >
    > >> > > > Dim dbConn, SQLStmt, dbComm, dbRead, img
    > >> > > > Dim myStream 'As New MemoryStream
    > >> > > > dbConn = New
    > >> > > > System.Data.OleDb.OleDbConnection(Application("connection_string"))
    > >> > > > dbConn.Open()
    > >> > > > img = "picture1"
    > >> > > > SQLStmt = "SELECT figura "
    > >> > > > SQLStmt = SQLStmt & "FROM figura_tb "
    > >> > > > SQLStmt = SQLStmt & "Where nome = "
    > >> > > > SQLStmt = SQLStmt & "'"
    > >> > > > SQLStmt = SQLStmt & img
    > >> > > > SQLStmt = SQLStmt & "'"
    > >> > > > dbComm = New System.Data.OleDb.OleDbCommand(SQLStmt,
    > >> > > > dbConn)
    > >> > > > dbRead = dbComm.ExecuteReader()
    > >> > > > If dbRead.read() Then
    > >> > > > myStream = dbRead("figura")
    > >> > > > End If
    > >> > >
    > >> > >
    > >> > >
    > >>
    > >>
    > >>

    >
    >
    >
     
    =?Utf-8?B?Um9ic29uIENhcnZhbGhvIE1hY2hhZG8=?=, Sep 22, 2004
    #9
  10. =?Utf-8?B?Um9ic29uIENhcnZhbGhvIE1hY2hhZG8=?=

    Hermit Dave Guest

    Rob,

    The problem is that the code that i attached was for resizing jpegs and not
    gifs.
    For gifs you need to set the correct Pallet. and you are also limited to
    8bit a pixel and 256 colors.

    The first link i passed the second time around that has a project and to my
    understanding there is nothing in the framework which helps you do
    transparent gifs.
    Download it... build it... dont understand it just yet.. use Reflector and
    then decompile to your VB.NET code... see how its implemented.

    You need to write the implementation for that.
    The dotnetjunkies link has a discussion on whether transparent gifs was
    possible and there was a msdn link in there that explained a great deal
    pallete etc.

    --

    Regards,

    Hermit Dave
    (http://hdave.blogspot.com)
    "Robson Carvalho Machado" <>
    wrote in message news:...
    > Yes, I can't get transparent gifs but theres ono more thing that is
    > related
    > to the same problem.
    > Any gifs are showed with poor quality because the color palet is not the
    > standard use by jpeg.
    >
    > Thanks for your help.
    > I'll wait for your answer
    >
    > Regards.
    > Robson Machado
    >
    > "Hermit Dave" wrote:
    >
    >> i will have a look at it... i was under the impression that you had it
    >> working only that you couldnt get transparent gifs anymore !!
    >> is that correct ?
    >>
    >> --
    >>
    >> Regards,
    >>
    >> Hermit Dave
    >> (http://hdave.blogspot.com)
    >> "Robson Carvalho Machado"
    >> <>
    >> wrote in message
    >> news:...
    >> > Dear Hermit,
    >> >
    >> > I'm trying to use this example since sep, 10 and I couldn't adjust my
    >> > VB
    >> > code using your code.
    >> >
    >> > Unfortunelly I'm not an expert VB programmer.
    >> >
    >> > Can you or some other friend help me with below code?
    >> >
    >> > Regards
    >> >
    >> > Imports System.io
    >> >
    >> > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    >> > System.EventArgs) Handles MyBase.Load
    >> > ScaleStatic("assinatura_promocao_1053", 150)
    >> > End Sub
    >> >
    >> > Public Sub ScaleStatic(ByVal ImageName, ByVal intSize)
    >> >
    >> > Dim con As New
    >> > System.Data.SqlClient.SqlConnection(Application("connection_string1"))
    >> > con.Open()
    >> > Dim cmd As New System.Data.SqlClient.SqlCommand("select figura
    >> > from
    >> > figura_tb where nome='" & ImageName & "'")
    >> > cmd.Connection = con
    >> > cmd.CommandType = CommandType.Text
    >> > Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    >> > Dim ds As New DataSet
    >> > da.Fill(ds)
    >> > Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0), Byte())
    >> > Dim myStream As New MemoryStream(bits)
    >> >
    >> > Dim imgPhoto As System.Drawing.Image =
    >> > System.Drawing.Image.FromStream(myStream)
    >> > Dim sourceWidth As Integer = imgPhoto.Width
    >> > Dim sourceHeight As Integer = imgPhoto.Height
    >> > Dim sourceX As Integer = 0
    >> > Dim sourceY As Integer = 0
    >> > Dim destX As Integer = 0
    >> > Dim destY As Integer = 0
    >> > Dim destWidth As Integer = 0
    >> > Dim destHeight As Integer = 0
    >> >
    >> > If imgPhoto.Width > imgPhoto.Height Then
    >> > destHeight = ((intSize * 1.0 / sourceWidth) * sourceHeight)
    >> > destWidth = intSize
    >> > Else
    >> > destHeight = intSize
    >> > destWidth = ((intSize * 1.0 / sourceHeight) * sourceWidth)
    >> > End If
    >> >
    >> > Dim bmPhoto As Bitmap = New Bitmap(destWidth, destHeight,
    >> > imgPhoto.PixelFormat.Format24bppRgb)
    >> > bmPhoto.SetResolution(imgPhoto.HorizontalResolution,
    >> > imgPhoto.VerticalResolution)
    >> >
    >> > Dim grPhoto As Graphics = Graphics.FromImage(bmPhoto)
    >> > grPhoto.CompositingQuality =
    >> > Drawing.Drawing2D.CompositingQuality.HighQuality
    >> > grPhoto.SmoothingMode =
    >> > Drawing.Drawing2D.SmoothingMode.HighQuality
    >> > grPhoto.InterpolationMode =
    >> > Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
    >> >
    >> > grPhoto.DrawImage(imgPhoto, New Rectangle(destX, destY,
    >> > destWidth,
    >> > destHeight), New Rectangle(sourceX, sourceY, sourceWidth,
    >> > sourceHeight),
    >> > GraphicsUnit.Pixel)
    >> >
    >> > bmPhoto.Save(Response.OutputStream,
    >> > System.Drawing.Imaging.ImageFormat.Gif)
    >> > grPhoto.Dispose()
    >> > bmPhoto.Dispose()
    >> >
    >> > End Sub
    >> >
    >> > "Hermit Dave" wrote:
    >> >
    >> >> have a look at this link.. the code is in c# but i gave you the link
    >> >> which
    >> >> does the code conversion so play with it.
    >> >>
    >> >> http://www.c-sharpcorner.com/Code/2003/March/ThumbnailImages.asp
    >> >>
    >> >> http://dotnetjunkies.com/Newsgroups/microsoft.public.dotnet.framework.drawing/2004/3/19/65540.aspx
    >> >>
    >> >> --
    >> >>
    >> >> Regards,
    >> >>
    >> >> Hermit Dave
    >> >> (http://hdave.blogspot.com)
    >> >> "Robson Carvalho Machado"
    >> >> <>
    >> >> wrote in message
    >> >> news:...
    >> >> > Dear Hermit Dave,
    >> >> >
    >> >> > Thanks. It has worked fine.
    >> >> >
    >> >> > But now, I need to solve other problem.
    >> >> > Using below code I can read transparet gif from SQL but at screen it
    >> >> > shows
    >> >> > transparent area as black. Can you help me?
    >> >> >
    >> >> >
    >> >> > Imports System.io
    >> >> > Public Class teste
    >> >> > Inherits System.Web.UI.Page
    >> >> >
    >> >> > #Region " Web Form Designer Generated Code "
    >> >> >
    >> >> > 'This call is required by the Web Form Designer.
    >> >> > <System.Diagnostics.DebuggerStepThrough()> Private Sub
    >> >> > InitializeComponent()
    >> >> >
    >> >> > End Sub
    >> >> >
    >> >> > 'NOTE: The following placeholder declaration is required by the
    >> >> > Web
    >> >> Form
    >> >> > Designer.
    >> >> > 'Do not delete or move it.
    >> >> > Private designerPlaceholderDeclaration As System.Object
    >> >> >
    >> >> > Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    >> >> > System.EventArgs) Handles MyBase.Init
    >> >> > 'CODEGEN: This method call is required by the Web Form
    >> >> > Designer
    >> >> > 'Do not modify it using the code editor.
    >> >> > InitializeComponent()
    >> >> > End Sub
    >> >> >
    >> >> > #End Region
    >> >> >
    >> >> > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    >> >> > System.EventArgs) Handles MyBase.Load
    >> >> > ScaleStatic("picture1", 50)
    >> >> > End Sub
    >> >> > Public Sub ScaleStatic(ByVal ImageName, ByVal intSize)
    >> >> >
    >> >> > Dim con As New
    >> >> > System.Data.SqlClient.SqlConnection(Application("connection_string1"))
    >> >> > con.Open()
    >> >> > Dim cmd As New System.Data.SqlClient.SqlCommand("select
    >> >> > figura
    >> >> from
    >> >> > figura_tb where nome='" & ImageName & "'")
    >> >> > cmd.Connection = con
    >> >> > cmd.CommandType = CommandType.Text
    >> >> > Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    >> >> > Dim ds As New DataSet
    >> >> > da.Fill(ds)
    >> >> > Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0),
    >> >> > Byte())
    >> >> > Dim myStream As New MemoryStream(bits)
    >> >> >
    >> >> > Dim imgPhoto As System.Drawing.Image =
    >> >> > System.Drawing.Image.FromStream(myStream)
    >> >> > Dim sourceWidth As Integer = imgPhoto.Width
    >> >> > Dim sourceHeight As Integer = imgPhoto.Height
    >> >> > Dim sourceX As Integer = 0
    >> >> > Dim sourceY As Integer = 0
    >> >> > Dim destX As Integer = 0
    >> >> > Dim destY As Integer = 0
    >> >> > Dim destWidth As Integer = 0
    >> >> > Dim destHeight As Integer = 0
    >> >> >
    >> >> > If imgPhoto.Width > imgPhoto.Height Then
    >> >> > destHeight = ((intSize * 1.0 / sourceWidth) *
    >> >> > sourceHeight)
    >> >> > destWidth = intSize
    >> >> > Else
    >> >> > destHeight = intSize
    >> >> > destWidth = ((intSize * 1.0 / sourceHeight) *
    >> >> > sourceWidth)
    >> >> > End If
    >> >> >
    >> >> > Dim bmPhoto As Bitmap = New Bitmap(destWidth, destHeight,
    >> >> > imgPhoto.PixelFormat.Format24bppRgb)
    >> >> > bmPhoto.SetResolution(imgPhoto.HorizontalResolution,
    >> >> > imgPhoto.VerticalResolution)
    >> >> >
    >> >> > Dim grPhoto As Graphics = Graphics.FromImage(bmPhoto)
    >> >> > grPhoto.CompositingQuality =
    >> >> > Drawing.Drawing2D.CompositingQuality.HighQuality
    >> >> > grPhoto.SmoothingMode =
    >> >> Drawing.Drawing2D.SmoothingMode.HighQuality
    >> >> > grPhoto.InterpolationMode =
    >> >> > Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
    >> >> >
    >> >> > grPhoto.DrawImage(imgPhoto, New Rectangle(destX, destY,
    >> >> > destWidth,
    >> >> > destHeight), New Rectangle(sourceX, sourceY, sourceWidth,
    >> >> > sourceHeight),
    >> >> > GraphicsUnit.Pixel)
    >> >> >
    >> >> > bmPhoto.Save(Response.OutputStream,
    >> >> > System.Drawing.Imaging.ImageFormat.Gif)
    >> >> > grPhoto.Dispose()
    >> >> > bmPhoto.Dispose()
    >> >> >
    >> >> > End Sub
    >> >> >
    >> >> > End Class
    >> >> >
    >> >> >
    >> >> >
    >> >> >
    >> >> > "Hermit Dave" wrote:
    >> >> >
    >> >> > > google is your true dear friend...
    >> >> > >
    >> >> > > Dim con As New System.Data.SqlClient.SqlConnection("data
    >> >> source=mt5;initial
    >> >> > > catalog=master;
    >> >> > > user id=sa;password=mms")
    >> >> > > con.Open()
    >> >> > > Dim cmd As New System.Data.SqlClient.SqlCommand("select *
    >> >> > > from
    >> >> > > SampleImageTable")
    >> >> > > cmd.Connection = con
    >> >> > > cmd.CommandType = CommandType.Text
    >> >> > > Dim da As New System.Data.SqlClient.SqlDataAdapter(cmd)
    >> >> > > Dim ds As New DataSet()
    >> >> > > da.Fill(ds)
    >> >> > > Dim bits As Byte() = CType(ds.Tables(0).Rows(0).Item(0),
    >> >> > > Byte())
    >> >> > > Dim memorybits As New MemoryStream(bits)
    >> >> > >
    >> >> > > http://www.dotnetspider.com/Technology/KBPages/558.aspx
    >> >> > >
    >> >> > > --
    >> >> > >
    >> >> > > Regards,
    >> >> > >
    >> >> > > Hermit Dave
    >> >> > > (http://hdave.blogspot.com)
    >> >> > > "Robson Carvalho Machado"
    >> >> <>
    >> >> > > wrote in message
    >> >> news:...
    >> >> > > > Does anyone knows how to CAST this SQL Response into a
    >> >> > > > MemoryStream
    >> >> > > > ??
    >> >> > > > When executing below code an error message says "Specified cast
    >> >> > > > is
    >> >> > > > not
    >> >> > > valid"
    >> >> > > >
    >> >> > > > I need to put this into MemoryStream to use it into imgPhoto
    >> >> > > > Dim imgPhoto As System.Drawing.Image =
    >> >> > > > System.Drawing.Image.FromStream(myStream)
    >> >> > > >
    >> >> > > > Dim dbConn, SQLStmt, dbComm, dbRead, img
    >> >> > > > Dim myStream 'As New MemoryStream
    >> >> > > > dbConn = New
    >> >> > > > System.Data.OleDb.OleDbConnection(Application("connection_string"))
    >> >> > > > dbConn.Open()
    >> >> > > > img = "picture1"
    >> >> > > > SQLStmt = "SELECT figura "
    >> >> > > > SQLStmt = SQLStmt & "FROM figura_tb "
    >> >> > > > SQLStmt = SQLStmt & "Where nome = "
    >> >> > > > SQLStmt = SQLStmt & "'"
    >> >> > > > SQLStmt = SQLStmt & img
    >> >> > > > SQLStmt = SQLStmt & "'"
    >> >> > > > dbComm = New System.Data.OleDb.OleDbCommand(SQLStmt,
    >> >> > > > dbConn)
    >> >> > > > dbRead = dbComm.ExecuteReader()
    >> >> > > > If dbRead.read() Then
    >> >> > > > myStream = dbRead("figura")
    >> >> > > > End If
    >> >> > >
    >> >> > >
    >> >> > >
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     
    Hermit Dave, Sep 22, 2004
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. B
    Replies:
    1
    Views:
    6,685
    Yan-Hong Huang[MSFT]
    Aug 14, 2003
  2. D
    Replies:
    2
    Views:
    624
  3. Steve
    Replies:
    0
    Views:
    876
    Steve
    Nov 17, 2003
  4. T. Davis
    Replies:
    4
    Views:
    20,202
    SeanMcIlvenna
    May 19, 2009
  5. alec maclean

    Looped output of images via MemoryStream?

    alec maclean, Apr 20, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    353
    alec maclean
    Apr 20, 2004
Loading...

Share This Page