This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, March 6, 2007 2:42:41 AM(UTC)
Groups: Registered
Posts: 3
Hi,
i store j2k files into base64 in my database and to retrieve picture, i decode base64 to byte array
and i don't know how to process that byte array server-side to display picture in a simple image control
because my goal is to create a gridview with an image control into each row. so i have to process picture server side to display into an image control
admin question : we bought the leadtools v13, how much will cost the update or will we have to buy the full V15? (answer this question on my email adress if you want)
kind regards.
#2
Posted
:
Thursday, March 8, 2007 4:09:19 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Hello,
If you have a valid J2K image in a memory buffer or stream, you can load it into LEADTOOLS using one of the memory or stream loading functions (depends on your programming interface). After that, you can save it either to disk or to another memory buffer or stream in a format that's supported by the image viewer.
About the upgrade price, please send your serial number(s) to
sales@leadtools.com in an email message, because the upgrade price depends on the product(s) you own.
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#3
Posted
:
Friday, March 9, 2007 1:11:31 AM(UTC)
Groups: Registered
Posts: 3
Hi, that was my question, i don't know how to use the component in asp.net server side (vb.net)
hte j2k files are valid because the leadtools 13 displays picture in the activeX
but the lead15 has classes that i can use server-side, but documentation doesn't show any example to display J2K into an image control
if you have a sample code, can you help me?
to be clear, i have a base64 string that i decode into byte array and/or stream and after this step, i don't how to use lead15 .net classes to use that byte array or stream to generate bitmap or image to be displayed into an image control
regards
#4
Posted
:
Monday, March 12, 2007 10:49:34 PM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Hello,
You can do this by using any .load method to load the J2K image on a RasterImage control.
But you will not be able to show the image on the viewer. You will be able to load the J2K image on a RasterImage control and then (if you wish) convert it to a System.Drawing.Image control as follows:
+-------------------------------------------------------------------+
Imports Leadtools
Imports Leadtools.Codecs
Imports System.IO
Partial Class _Default
Inherits System.Web.UI.Page
Dim MyImage As RasterImage
Dim Codecs As RasterCodecs
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
RasterCodecs.Startup()
Codecs = New RasterCodecs()
Dim fname As String = "C:\Image.J2k"
Dim fs As FileStream
fs = New FileStream(fname, FileMode.Open, FileAccess.Read)
Dim bytes(fs.Length) As Byte
fs.Read(bytes, 0, fs.Length)
Dim ms As MemoryStream
ms = New MemoryStream()
ms.Write(bytes, 0, bytes.Length)
ms.Seek(0, SeekOrigin.Begin)
MyImage = Codecs.Load(ms)
Dim SysImage As System.Drawing.Image
SysImage = MyImage.CreateGdiPlusGraphics().Image
RasterCodecs.Shutdown()
End Sub
End Class
+-------------------------------------------------------------------+
Thanks,
Maen Badwan
LEADTOOLS Technical Support
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.