|
Hi.
I'm looking on how to get the information from an image.
The information i need is its codec or compression.
The reason why i need this is because, i have a large quantity of .TIF files. But some were not converted right and are color TIFs (IrFan View says : "Old JPEG (in TIFF)"). I need to get these files and convert them to the real .JPG.
So, i want to get the codec information from a file and compare it to a string. I'd use the "for" sentence to go through the whole list of files.
Summary (a scratch code):
for(int i = 0; i<files.count;i++)>
get codec from files[i]
if codec == old jpeg
then move the file to a folder
Any idea on how to get this information?
Thanks in advance!
Regards,
Matjaž
|
|
|
|
|
Hello!
In an attempt to streamline downloading from a FTP share I'm making a small front end that retrieves files based off of names. The problem I'm experiencing stems from the method I'm using to download the files. Without going into extraordinary detail, the front end is experimenting with querying the FTP to retrieve the file rather than directly downloading it. As a basic example, directing the webBrowser to a URL generated by the FTP that allows the user to download the file. However the problem I'm running into is in the simple call;
webBrowswer1.Navigate(ftpDownloadUrl);
As this is called it opens up the Open / Save dialogue box prompting the user for where they would like to store the file. I'm trying to streamline the process and have the program save it to a predefined location (even start up path). So finally to my question!
Is it possible to have it automatically accept the save location or if not have the program record where the file was stored to move it to a specified directory (assuming permissions)? Thanks in advance!
Colin
|
|
|
|
|
Take a look at the FtpWebRequest[^] class. You should be able to download a file from the ftp server, and then write the data stream out to where ever you want.
Simon
|
|
|
|
|
Thank you for the reply but I'm trying to get this to work explicitly using the webBrowser technique. Any other suggestions?
|
|
|
|
|
I may be adding confusion by including the information about the FTP. My final goal is to have the application download files from a URL without having to ask permission from the user for each file.
Thanks again,
Colin
|
|
|
|
|
No other suggestions. Sorry. The WebBrowser is exactly that, it's an embedded web browser, your trying to use if for something it's not really designed for. When you tell it to navigate to the URL, it will behave exactly like a web browser would if the user navigated to the URL.
If your not just looking at ftp, there's the HttpWebRequest[^] class, and the abstract base WebRequest[^]. You would be able to use them to handle any kind of download url you need to.
(There's a bunch of others too like FileWebRequest and PackWebRequest for downloading from different kinds of web resources)
Simon
|
|
|
|
|
I do this:
<pre>XDocument xmlDoc = new XDocument();
if (indice == 1)
{
xmlDoc =
new XDocument(
new XDeclaration("1.0", Encoding.UTF8.HeaderName, String.Empty),
new XComment("Xml Document"),
new XElement("alinieri",
new XElement("align",
new XAttribute("id",indice),
new XElement("edtlr-def",entry_node[idx]),
new XElement("wnrom-synset", wn_synset)
)
)
);
xmlDoc.Save("alinieri.xml");
}
</pre>
my entry_node[idx] is a string containing xml code,same is wn_synset.
My problem is that in the saved xml it shows this(just the beginning):
<alinieri>
<align id="1">
<edtlr-def><definition>
<SpecDef>(Uneori cu determinări care indică sursa, provenienţa)</SpecDef>
instead of
<definition><specdef>(Uneori cu determinări care indică sursa, provenienţa)</specdef>
as it is in the one of the strings.
And the & lt ; & gt ; were supposed to be < >. What should I do? </definition></edtlr-def></align></alinieri>
<div class="ForumMod">modified on Wednesday, March 11, 2009 4:08 AM</div>
|
|
|
|
|
hi
how to write a dll component in C#.net?
how to start?
how to write?
howwwwwwww.......?
if you have an article or reference or book please introduce
Thanks
|
|
|
|
|
Create a new project "Dynamic Link Library" in Visual Studio, write your code, then compile it..
|
|
|
|
|
thanks for help
your purpose is WindowsFormsControlLibrary?
and how can i inherit from a control?
how can i add an event?
|
|
|
|
|
Try to learn C# Object Oriented Programming first...
public class MyControl : Control
{
public event EventHandler MyEvent;
...
}
|
|
|
|
|
|
learn how to use google or forget VS
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Member 4025191 wrote: if you have an article or reference or book please introduce
Multiple! The question at hand is whether you would actually read them.
Try this[^] one
I are troll
|
|
|
|
|
what is the similar code to application.startuppath in asp.net, i'm trying to write a xml file to get the db connection info.how can i do this.
|
|
|
|
|
With ASP.NET you usually do all that in the web.config file.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
i using this codes.....some times i get this error message...any one know why????
"the process cannot access the file because it is being used by another proces"
this is the message but its not using any other process...
here is my code
foreach (ListViewItem item in listView2.SelectedItems)
{
listView2.FocusedItem = listView2.Items[item.Index];
DSOFile.OleDocumentPropertiesClass file = new DSOFile.OleDocumentPropertiesClass();
file.Open(listView2.FocusedItem.Text, false, DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess);
file.SummaryProperties.Title = tbxTitle.Text;
file.SummaryProperties.Subject = tbxSubject.Text;
file.SummaryProperties.Keywords = tbxKeywords.Text;
file.SummaryProperties.Author = tbxAuthor.Text;
file.SummaryProperties.Comments = tbxComments.Text;
file.Close(true);
MessageBox.Show("Changes Added into Selected File");
}
A S E L A
|
|
|
|
|
Hello,
Are you using any System.IO methods in your code (not shown) to files. If so, are you closing out the file in those methods?
-Colin
|
|
|
|
|
ya im using
"using Edanmo.OleStorage"
ya i closed the file once i used it.....that already in the code....
but some time able to do by dong click on another items and then click on that item back.....
any idea ?????
and thanks 4 ur reply
A S E L A
|
|
|
|
|
A S E L A wrote: its not using any other process
Not your application, but the file that you are trying to read is being used by another proces. You're opening a file on this line 'ere;
file.Open(listView2.FocusedItem.Text, false, ..
That's the file that is being used by another proces, and the statement can't be executed because of it. Are you using Microsoft Word to "look" at the data you're trying to import?
I are troll
|
|
|
|
|
its only use to read the summary property but once i use it, i close the file....every where....every time
is there got any thing to do like "flush" or etc... other than close();
A S E L A
|
|
|
|
|
The Close method should be sufficient, though that really depends on the implementation of the class that you're using to read the file. If "file" were a local variable, it could go out of scope and be garbage collected by the GC
I are troll
|
|
|
|
|
i guess the problem it closing.....
file.close(true); is not closeing all and every thing....
i tried
file.save();
file.close(fales);
still same....
A S E L A
|
|
|
|
|
Hello
Im writing a simple messenger and im having trouble with the
"Private Messages"
i worte the shared object between the clinet and the server
later all the clients subscribe to the server events Let Say "User Send Message" event
Now ,Let say that User "michael" wants to send Message to "liron"
So im iterating in server side on each Subscriber ,
How can i know which of the subscribers are "liron"?
can i find any value that identify "liron "?
UserSendMsgHandler messageDelegate = null;
Delegate[] invocationList_ = null;
try
{
invocationList_ = onUserSendMsg.GetInvocationList();
}
catch
{
}
if (invocationList_ != null)
{
lock (this)
{
foreach (Delegate del in invocationList_)
{
try
{
messageDelegate = (UserSendMsgHandler)del;
messageDelegate(Msg,Sender,Receivers[0]);
}
catch
{
onUserSendMsg -= messageDelegate;
}
}
}
}
|
|
|
|
|
I am using a dataset in businesslayer for getting project details like ProjectId,ProjectName,ProjectType. I want to return this collection to UI layer in a list or in some form of collection objects, but not using a dataset.
For eg: 1,'TestProject1','Maintenance'(ProjectId,ProjectName, ProjectType)
2,'TestProject2','Support'(ProjectId,ProjectName,ProjectType)
How can I store in business class and retrieve the same in UI layer? Somehow I created some properties and can added to the list. But don't know how to retrieve the same. Can anybody please help. Please let me know if I require to provide any more info.
Thanks,
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|