3
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by Teme64
0

There's no API calls needed. If you have a picturebox control and an image file, you just do the following:

PictureBox1.Image = Image.FromFile("C:\somepic.jpg")

Of cource, there are other ways to get and display images depending on the source of the image.

0

I save the picture in an array of byte in a file
and the picture was choosen from uploadefile web server control
i want to display the picture a gain on the screen using the repeater . do i need the API to display it

0

Still no API needed.

Imports System.IO

Dim MemStream As MemoryStream
Dim ByteArr() As Byte

' Read image bytes from the file
ByteArr = My.Computer.FileSystem.ReadAllBytes("C:\somepic.jpg")
' Create a memory stream from the bytes
MemStream = New MemoryStream(ByteArr)

' Create an image from the stream
PictureBox1.Image = Image.FromStream(MemStream)

and the picture box is a control in the repeater control.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.