If you have a "File Open Box" then you should already have the file path. What ever method you are calling to launch the open file dialog will most likely return the path to the file. For example in Win32::GUI you could use:
my $file = Win32::GUI::GetOpenFileName(
-owner => $Window, # Main window for modal dialog
-title => "Open an image file", # Dialog title
-filter => [ # Filter file
'JPG file (*.jpg)' => '*.jpg',
'All files' => '*.*',
],
-directory => ".", # Use current directory
);
You would probably not want to use the directory flag in your case because you stated that the image could be anywhere. My point is that you can now use $file to open the image, it contains the path to your file. My guess is if you are using some other package/method that it too would return the path to the file.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.