473,770 Members | 2,630 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

determining file type

I opened an image file (bmp, jpeg etc) using FileOpenDialog and getting its
resolution, height and width. Now I want to get type of the file (not
looking at the extension, but which is kept inthe header pf the file). But i
couldn't find a method to directly get it by .NET command.
Do I have to use some APIs? or do you know a method to find out the file
type / format??
Thanks.
Mar 13 '06 #1
1 1713
Hi,

If you know the format's header structure you can read the correct amount of
bytes and recreate it in memory
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Sirin Azazi" <si****@tedasne t.gov.tr> wrote in message
news:uD******** ******@TK2MSFTN GP12.phx.gbl...
I opened an image file (bmp, jpeg etc) using FileOpenDialog and getting its
resolution, height and width. Now I want to get type of the file (not
looking at the extension, but which is kept inthe header pf the file). But
i couldn't find a method to directly get it by .NET command.
Do I have to use some APIs? or do you know a method to find out the file
type / format??
Thanks.

Mar 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1692
by: CTDev Team | last post by:
Hi, We are using Exchange Server 5.5, and have applications written in VB6 and C# that read and process emails. We are experiencing intermittent errors similar to C# Application System.Runtime.InteropServices.COMException (0x80004005): The client
2
3646
by: Garrett | last post by:
Need any help in determining which groups have been given security access to a folder. Searched DirectoryServices to no avail... Any Help?
1
1574
by: Vagabond Software | last post by:
I'm writing an application where then end-user will want to view and print (not edit) TIFF and JPEG images. For now, I simply use the System.Diagnostics.Process.Start method to open the desired image with the application currently associated with that file type. However, sometimes the wrong application is associated with a file type. For example, Microsoft Office Picture Manager will only display the first page of a multi-page TIFF...
4
2162
by: petermichaux | last post by:
Hi, I'm hoping for a reason I'm wrong or an alternate solution... I'd like to be able to dynamically include some javascript files. This is like scriptaculous.js library but their solution is broken in Firefox 1.5.0.1 on OS X. What happens with the Scriptaculous library is this In the html document the author only has to include one line
8
2124
by: Ritesh Raj Sarraf | last post by:
Hi, I have a funtion named unzipper() which does the work of unzipping the files. Is there a way I can identify what is the type of the file which'll be passed to unzipper(). If yes, I'll be able to make out if it's a zip file or a tar or a bz2 file.
9
3091
by: tubby | last post by:
Silly question, but here goes... what's a good way to determine when a file is an Open Office document? I could look at the file extension, but it seems there would be a better way. VI shows this info in the files: mimetypeapplication/vnd.oasis.opendocument.textPK mimetypeapplication/vnd.oasis.opendocument.presentationPK etc. Not really a Python specific question but, how do you guys do this sort of thing? I've figured out how to...
2
2079
by: pob | last post by:
I was all happy because thru some tutelage of others I created this array to find the newest file in a directory. However, I then realized its great that I now know the latest file, but I need to know the name of the file. Unfortunately, I am only passing the date into the array. Do I need to create a m-d array ? If so how do I create a 2-d array where I do not know how many rows I will be looping thru ?
1
2257
by: Nathan Sokalski | last post by:
I am having trouble determining the MIME type of a file. Does anybody know how to do this for a file programmatically? Thanks. -- Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/
5
21065
by: Queez | last post by:
Afternoon, I've spent all morning trawling the net looking for an answer to this. In the end, I've had to resort to good old fashioned asking. How do you determine a file's MIME type using VB.NET? The problem is: - I have an ASP.NET web application - I can display a list of all files in a directory on the server (it's a "directory share" for a scanner) - I want the user to be able to select one of the files to import into the...
0
9602
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9882
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8905
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7431
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5326
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2832
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.