473,385 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

1
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
Jan 27 '08 #1
1 1226
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(ByVal FilePath As String, ByVal Width As Integer, ByVal Heght As Integer)
If Not FilePath = "" Then
Dim ArrFiles() As String = Directory.GetFiles(Server.MapPath(".") & "\ImageCache")
For Each f As String In ArrFiles
File.Delete(f)
Next
Dim _stream As System.IO.Stream = File.Open(FilePath, FileMode.Open)
Dim _bmp As New Bitmap(Image.FromStream(_stream), Width, Heght)
Context.Response.ContentType = "image/jpeg"
Dim FileConvert As String = Server.MapPath(".") & "\ImageCache\" & Me.GetFileName(FilePath) & ".jpg"
If Not File.Exists(FileConvert) Then
_bmp.Save(FileConvert, ImageFormat.Jpeg)
End If
_bmp.Dispose()
_stream.Close()
End If
End Sub

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

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

Protected Sub btLoad_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btLoad.Click
Dim FileName As String = Me.GetFileName(FileUpLoad.Value)
Me.ConvertImage(FileUpLoad.Value, 800, 1100)
Me.LoadImage(FileName)
End If
End Sub
Jan 31 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

58
by: Jeff_Relf | last post by:
Hi Tom, You showed: << private const string PHONE_LIST = "495.1000__424.1111___(206)564-5555_1.800.325.3333"; static void Main( string args ) { foreach (string phoneNumber in Regex.Split...
3
by: NeverLift | last post by:
But, if it's not open, I don't want to open it . . . using window.open will open it if it doesn't exist, even if the url in that open is null (the window is then empty -- but it's open). The...
8
by: Asma | last post by:
Dear Sir, I am trying to find a way to open a Word document using C language and read the text of word doc into a variable. (Turbo C on Dos 6.0). Can anyone please tell me which libraries in...
3
by: Frank Perry | last post by:
Howdy, I'm trying to write data out the com port. I have taken the code from the sample on the MSDN Library CD and used the parts that seem relevant. I can open the com port with CreateFile...
1
by: ABCL | last post by:
Hi All, I am working on the situation where 2 different Process/Application(.net) tries to open file at the same time....Or one process is updating the file and another process tries to access...
6
by: Moumen VB.NET 2003/2005 Developer | last post by:
How can I detect if a file sitting on a network drive is still open by another application? This application resides on another machine on the network? I am using VB.NET 2003 Your help is...
5
by: Ryan Liu | last post by:
Hi, Both way works, I'd just ask some experts which way is better? My application creates a log file daily. Now each time when I write a log, I will open the file and append to the end....
7
by: Peter | last post by:
ASP.NET 2.0 I am trying to open a Word document and Excel document from a dialog web page, what's the best way to do that? I have tried the following: Response.Clear();...
5
by: Stefano Tonello | last post by:
Hi all, I need to call windows' "open with" dialog from my C# windows form application. After the user selects application, control must return to me (I have to launch directly the process). I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.