ASP.NET

Moderators: None (Apply to moderate this forum)
Number of threads: 1727
Number of posts: 3292

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Manipulating TIFF files in ASP.NET and VB.NET Posted by fred on 29 Aug 2001 at 5:49 AM
I am designing an application which will take the name of
an existing TIFF file and allow the user to view a listing
of the various pages contained in the TIFF, as well as
extract individual pages from the TIFF and save them as
separate files.

I am looking for information on manipulating TIFF's in
the .net framework using vb.net and asp.net.

Thanks very much for any help/direction you can offer.


Report
Re: Manipulating TIFF files in ASP.NET and VB.NET Posted by WEBMASTER on 6 Sept 2001 at 7:15 AM
Take a look at the Visual Studio .NET documentation, there's a lot of info about TIFF images and .NET do supports TIFF.

The alternative is to look at vendors like:
http://www.leadtools.com/



/WEBMASTER


Report
Re: Manipulating TIFF files in ASP.NET and VB.NET Posted by tiffviewer on 23 Mar 2009 at 8:24 PM
You can try out this C# VB.NET Tiff viewer, you can also use to view TIFF files in ASP.NET

Visit www.tiffviewer.net

Why use so much costly, third party controls? :)
Report
Re: Manipulating TIFF files in ASP.NET and VB.NET Posted by nextcmchiru on 24 Dec 2011 at 5:21 PM
Imports System.IO

Class Application

Public Shared Sub processTiffFile(filename As String)
' Open a Stream and decode a TIFF image
Dim imageStreamSource As New FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read)
Dim decoder As New TiffBitmapDecoder(imageStreamSource, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default)

' loop through the frames.
For i As Integer = 0 To (decoder.Frames.Count - 1)

Dim bitmapSource As BitmapSource = decoder.Frames(i)
Dim encoder As New JpegBitmapEncoder()
Dim stream As New FileStream("frame" + Convert.ToString(i) + ".jpg", FileMode.Create)

' Draw the Image
Dim myImage As New Image()
myImage.Source = bitmapSource
myImage.Stretch = Stretch.None

encoder.Frames.Add(BitmapFrame.Create(bitmapSource))
encoder.Save(stream)
Next

End Sub



' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
Private Sub App_Startup(ByVal sender As Object, ByVal e As StartupEventArgs)
' Application is running
' Process command line args
Dim startMinimized As Boolean = False
Dim showWindow As Boolean
showWindow = True

For i As Integer = 0 To (e.Args.Length - 1)
If e.Args(i).ToLower().EndsWith(".gif") Then
' startMinimized = True
processTiffFile(e.Args(i))
showWindow = False
End If
Next

If Not showWindow Then
Environment.Exit(0)
End If

End Sub
End Class


Imports System.IO
Imports System.Windows.Forms

Class MainWindow


Private Sub Button2_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button2.Click
Dim openFileDialog1 As New OpenFileDialog()
openFileDialog1.InitialDirectory = ""
openFileDialog1.Filter = "TIFF files (*.tif;*.tiff) |*.tiff;*.tif"
openFileDialog1.FilterIndex = 0
If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then

Application.processTiffFile(openFileDialog1.FileName)
MessageBox.Show("Processing complete. The frames were split up and stored in the same directory as this program's exe.")
End If
End Sub
End Class





Report
Re: Manipulating TIFF files in ASP.NET and VB.NET Posted by nextcmchiru on 24 Dec 2011 at 5:22 PM
herer is the code for it :

Imports System.IO

Class Application

Public Shared Sub processTiffFile(filename As String)
' Open a Stream and decode a TIFF image
Dim imageStreamSource As New FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read)
Dim decoder As New TiffBitmapDecoder(imageStreamSource, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default)

' loop through the frames.
For i As Integer = 0 To (decoder.Frames.Count - 1)

Dim bitmapSource As BitmapSource = decoder.Frames(i)
Dim encoder As New JpegBitmapEncoder()
Dim stream As New FileStream("frame" + Convert.ToString(i) + ".jpg", FileMode.Create)

' Draw the Image
Dim myImage As New Image()
myImage.Source = bitmapSource
myImage.Stretch = Stretch.None

encoder.Frames.Add(BitmapFrame.Create(bitmapSource))
encoder.Save(stream)
Next

End Sub



' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
Private Sub App_Startup(ByVal sender As Object, ByVal e As StartupEventArgs)
' Application is running
' Process command line args
Dim startMinimized As Boolean = False
Dim showWindow As Boolean
showWindow = True

For i As Integer = 0 To (e.Args.Length - 1)
If e.Args(i).ToLower().EndsWith(".gif") Then
' startMinimized = True
processTiffFile(e.Args(i))
showWindow = False
End If
Next

If Not showWindow Then
Environment.Exit(0)
End If

End Sub
End Class


Imports System.IO
Imports System.Windows.Forms

Class MainWindow


Private Sub Button2_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button2.Click
Dim openFileDialog1 As New OpenFileDialog()
openFileDialog1.InitialDirectory = ""
openFileDialog1.Filter = "TIFF files (*.tif;*.tiff) |*.tiff;*.tif"
openFileDialog1.FilterIndex = 0
If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then

Application.processTiffFile(openFileDialog1.FileName)
MessageBox.Show("Processing complete. The frames were split up and stored in the same directory as this program's exe.")
End If
End Sub
End Class





Report
Re: Manipulating TIFF files in ASP.NET and VB.NET Posted by nextcmchiru on 24 Dec 2011 at 5:24 PM
herer is the code for it :

Imports System.IO

Class Application

Public Shared Sub processTiffFile(filename As String)
' Open a Stream and decode a TIFF image
Dim imageStreamSource As New FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read)
Dim decoder As New TiffBitmapDecoder(imageStreamSource, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default)

' loop through the frames.
For i As Integer = 0 To (decoder.Frames.Count - 1)

Dim bitmapSource As BitmapSource = decoder.Frames(i)
Dim encoder As New JpegBitmapEncoder()
Dim stream As New FileStream("frame" + Convert.ToString(i) + ".jpg", FileMode.Create)

' Draw the Image
Dim myImage As New Image()
myImage.Source = bitmapSource
myImage.Stretch = Stretch.None

encoder.Frames.Add(BitmapFrame.Create(bitmapSource))
encoder.Save(stream)
Next

End Sub



' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
Private Sub App_Startup(ByVal sender As Object, ByVal e As StartupEventArgs)
' Application is running
' Process command line args
Dim startMinimized As Boolean = False
Dim showWindow As Boolean
showWindow = True

For i As Integer = 0 To (e.Args.Length - 1)
If e.Args(i).ToLower().EndsWith(".gif") Then
' startMinimized = True
processTiffFile(e.Args(i))
showWindow = False
End If
Next

If Not showWindow Then
Environment.Exit(0)
End If

End Sub
End Class


Imports System.IO
Imports System.Windows.Forms

Class MainWindow


Private Sub Button2_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button2.Click
Dim openFileDialog1 As New OpenFileDialog()
openFileDialog1.InitialDirectory = ""
openFileDialog1.Filter = "TIFF files (*.tif;*.tiff) |*.tiff;*.tif"
openFileDialog1.FilterIndex = 0
If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then

Application.processTiffFile(openFileDialog1.FileName)
MessageBox.Show("Processing complete. The frames were split up and stored in the same directory as this program's exe.")
End If
End Sub
End Class








 

Recent Jobs