I am able to open .tif file And Free Handle Write

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kacnd
    New Member
    • Jan 2008
    • 1

    I am able to open .tif file And Free Handle Write

    Hi all,

    I m using Windows XP pro OS and frontend is ASP.Net . I want to open a tif file within the .aspx web page.Now I am able to open .tif file in default Microsoft office document Imaging .But i want to display the .tif image file in web page, so that it can be viewed in a HML Frame .Can anyone help me ? Please reply soon.


    And I want To Write Free Handle On The Tiff File
    Please Please Help Me Quick


    KAXND
  • minhnhat2807
    New Member
    • Dec 2007
    • 4

    #2
    Originally posted by kacnd
    Hi all,

    I m using Windows XP pro OS and frontend is ASP.Net . I want to open a tif file within the .aspx web page.Now I am able to open .tif file in default Microsoft office document Imaging .But i want to display the .tif image file in web page, so that it can be viewed in a HML Frame .Can anyone help me ? Please reply soon.


    And I want To Write Free Handle On The Tiff File
    Please Please Help Me Quick


    KAXND

    Private Sub ConvertImage(By Val FilePath As String, ByVal Width As Integer, ByVal Heght As Integer)
    If Not FilePath = "" Then
    Dim ArrFiles() As String = Directory.GetFi les(Server.MapP ath(".") & "\ImageCach e")
    For Each f As String In ArrFiles
    File.Delete(f)
    Next
    Dim _stream As System.IO.Strea m = File.Open(FileP ath, FileMode.Open)
    Dim _bmp As New Bitmap(Image.Fr omStream(_strea m), Width, Heght)
    Context.Respons e.ContentType = "image/jpeg"
    Dim FileConvert As String = Server.MapPath( ".") & "\ImageCach e\" & Me.GetFileName( FilePath) & ".jpg"
    If Not File.Exists(Fil eConvert) Then
    _bmp.Save(FileC onvert, ImageFormat.Jpe g)
    End If
    _bmp.Dispose()
    _stream.Close()
    End If
    End Sub

    Private Function GetFileName(ByV al FilePath As String)
    Dim ArrFileName() As String = FilePath.Split( "\")
    Dim FileName() As String = ArrFileName(Arr FileName.Length - 1).Split(".")
    Return FileName(0)
    End Function

    Public Sub LoadImage(ByVal FileName As String)
    Dim path As String = "~\ImageCac he\" & FileName & ".jpg"
    Image1.Src = path
    End Sub

    Protected Sub btLoad_Click(By Val sender As Object, ByVal e As System.EventArg s) Handles btLoad.Click
    Dim FileName As String = Me.GetFileName( FileUpLoad.Valu e)
    Me.ConvertImage (FileUpLoad.Val ue, 800, 1100)
    Me.LoadImage(Fi leName)
    End If
    End Sub

    Comment

    Working...