Trying to get the Filetype of a file with a random extension.  i.e., image.1

Hello all,
I am dealing with images with the .1 -.6 standard which is used by companies like Gladson imagery.  I am given these files and I need to find out there FileTypes, which I also have heard can be called "MIME" types?  If that is different I let me know please.
I tried to use the Files API Files (Java Platform SE 7 )
Specifically probeContentType, but I get "null" for the .1 images, while the .bmp image does give me "image/bmp" as the result.
I am thinking of reading the file into the program, then just outputting it into a file with a readable extension.
Or is there a better way to do this?
Thanks,
~KZ

.1-.6 means nothing, it's a file extension given by Gladson.  Gladson > Our Services > Product Image Database but you seem to ignore this.
You say it means 'nothing' but your original question says it is a standard:
I am dealing with images with the .1 -.6 standard which is used by companies like Gladson imagery
I've never heard of any such '.1 -.6 standard' and can't find ANY reference on the web to any such standard.
So it is only appropriate to ask you what you are talking about. You didn't explain WHAT standard you are referring to, provide ANY information about that 'standard' or provide any link to documentation about that 'standard' so we can figure out what you are talking about.
I don't know why a lot of the people on this forum feel the need to tell people their questions aren't good enough, when the question is pretty simple.
They do that to let you know that you need to provide MORE information or a better explanation of what you are asking.
Just because you don't know part of the question, doesn't mean the question is invalid.
Reread my reply and you will see that it doesn't say the question is 'invalid'. It said
If you want help it is YOUR responsibility to provide the information anyone would need to help you. No one is going to go searching the web to try to find out what a '.1 -.6 standard' might be, assuming there even is such a thing.
You began your thread by referring to a 'standard' and I can find NO such standard anywhere. So there is no context for your question since it relates to a standard that doesn't appear to exist.
  Especially when the part of the question, in this case the .1 fileExtention doesn't really have much to do with the question, which is why it was an example.
You are the one that first mentioned a 'standard'. If it doesn't 'have much to do with the question' then you are just confusing the issue by including it as a key part of your thread. If there IS such a standard then, being a standard, it would be documented and that documentation would likely explain the actual binary format of files that are created using that standard. That binary format would have information that could be used to identify the file type.
For example a PDF file uses a 'standard' file format. The format is documented by Adobe and if you examine a file you might find the first line looks like this:
%PDF-1.4
That 'signature' helps to identify the file as using the PDF file format.
But now you seem to be asking this totally different question:
Given graphic files with meaningless names and extensions (and thus of unknown type) how does one determine the actual FileTypes (BMP, GIF, etc), which I also have heard can be called "MIME" types?
Is that the question you are really asking?
If it is then there IS NO generic way to identify an arbitrary file format since each 'standard' format is different and will have different possible 'signature' characteristics. You would have to have code to test for EVERY possible 'signature'.
That is why if the standard you referenced actually existed it would help determine what the list of POSSIBLE file types might be. If you know that each file MUST BE a Gladson file type then the first step is to create a list of ALL possible file types that Gladson uses.
Then you can locate the documentation for each of those file types (e.g. BMP, GIF, etc) to determine how to create a 'parser' to check for those 'signatures'.

Similar Messages

  • How on can get the plaback of .mov files with Redcode Codecs?

    Hi folks,
    I am not able to play the .mov files created by Red camera so..
    how one can get the playback of .mov files with Redcode Codecs?

    Well, one typically doesn't edit with any of the proxy-files the RED camera produces.  You need to convert the RED footage to ProRes.  Log and Transfer can do this, if you download and install the RED Log and Transfer plugin.  Or you might need to use RED software to convert the footage to ProRes.  But those Red proxy files won't import via log and transfer, and are NOT editable in FCP.  Gotta convert to ProRes.

  • How can I get the size of a file with apple script

    I try to get the size of a file within an apple script. But I did not find information how to do this.

    There are two ways. I think Apple is moving toward using System Events, which is listed first.tell application "Finder"
    set myFile to selection as alias
    --this just gets a file for me to work with
    --coercing it into an alias is required for the other functions
    end tell
    tell application "System Events"
    get size of myFile
    end tell
    set myInfo to (info for myFile)
    get size of myInfo

  • Trying to Validate the name of a file with a Validator

    Hi, Im trying to validate an file name that is sent with a form
    I want that the Validator Checks if the filename ends with some extensions (.jpg ,etcc) for only addmit one type of files (images)
    I ve build my own Pluggable Validator , but I dont know how to extract the filename from Validator.
    Can anyone help me??
    the Code is something like this
    where
    package jmar5439.webpage.validator;
    import javax.servlet.ServletContext;
    import javax.servlet.http.HttpServletRequest;
    import java.io.Serializable;
    import org.apache.struts.action.*;
    import org.apache.commons.validator.ValidatorAction;
    import org.apache.commons.validator.*;
    import org.apache.commons.validator.Field;
    import org.apache.commons.validator.GenericValidator;
    import org.apache.commons.validator.util.ValidatorUtils;
    import org.apache.commons.validator.Validator;
    import org.apache.struts.validator.Resources;
    import org.apache.commons.logging.LogFactory;
    import jmar5439.webpage.action.InsertRoomAction;
    import org.apache.commons.logging.Log;
    public class ImageFileValidator implements Serializable {
    // public ImageFileValidator() {}
    public static boolean validateImageFile(Object bean, ValidatorAction va,
    Field field, ActionMessages errors,
    HttpServletRequest request, Validator validator) {
    String value = null;
    if (field.getProperty() != null && field.getProperty().length() > 0) {
    value = ValidatorUtils.getValueAsString(bean, field.getProperty());
    String file = new String(value);
    file = file.toLowerCase();
    if (!GenericValidator.isBlankOrNull(value)) {
    try {
    if (!file.endsWith(".jpeg") || !file.endsWith(".gif") ||
    !file.endsWith(".jpg")) {
    errors.add(field.getKey(),
    Resources.getActionMessage(request, va,
    field));
    return false;
    } catch (Exception e) {
    errors.add(field.getKey(),Resources.getActionMessage(request, va,field));
    return false;
    return false;
    return false;
    I ve declared
    <form-property name="file"
                   type="org.apache.struts.upload.FormFile"/>
    in struts-config file and
    <field property="file"
                        depends="imagefile">
    in validate file.
    Thanks

    I ve solved like this
    package jmar5439.webpage.validator;
    import javax.servlet.ServletContext;
    import javax.servlet.http.HttpServletRequest;
    import java.io.Serializable;
    import org.apache.struts.action.*;
    import org.apache.commons.validator.ValidatorAction;
    import org.apache.commons.validator.*;
    import org.apache.commons.validator.Field;
    import org.apache.commons.validator.GenericValidator;
    import org.apache.commons.validator.util.ValidatorUtils;
    import org.apache.commons.validator.Validator;
    import org.apache.struts.validator.Resources;
    import org.apache.commons.logging.LogFactory;
    import jmar5439.webpage.action.InsertRoomAction;
    import org.apache.commons.logging.Log;
    import org.apache.struts.upload.FormFile;
    import org.apache.commons.beanutils.PropertyUtils;
    import java.lang.reflect.*;
    public class ImageFileValidator implements Serializable {
    // public ImageFileValidator() {}
    public static boolean validateImageFile(Object bean, ValidatorAction va,
    Field field, ActionMessages errors,
    Validator validator,
    HttpServletRequest request) {
    Log log = LogFactory.getLog(ImageFileValidator.class);
    //log.info(form.toString() );
    String value = ValidatorUtils.getValueAsString(
    bean,
    field.getProperty());
    if (!GenericValidator.isBlankOrNull(value)) {
    try {
    FormFile file = (FormFile) PropertyUtils.getSimpleProperty(bean,
    "file");
    String filename=file.getFileName().toLowerCase() ;
    //log.info("Filename:" + file.getFileName());
    if (filename.endsWith(".jpeg") ||
    filename.endsWith(".jpg") ||
    filename.endsWith(".gif")) {
    log.info("return true");
    return true;
    } else {
    errors.add(field.getKey(),
    Resources.getActionMessage(request, va,
    field));
    log.info("return false");
    return false;
    } catch (NoSuchMethodException ex) {
    errors.add(field.getKey(),
    Resources.getActionMessage(request, va,
    field));
    return false;
    } catch (InvocationTargetException ex) {
    errors.add(field.getKey(),
    Resources.getActionMessage(request, va,
    field));
    return false;
    } catch (IllegalAccessException ex) {
    errors.add(field.getKey(),
    Resources.getActionMessage(request, va,
    field));
    return false;
    //return false;
    // log.info("Entra0");
    /* if (field.getProperty() != null && field.getProperty().length() > 0) {
    // log.info("Entra");
    // value = ValidatorUtils.getValueAsString(bean, field.getProperty());
    value = ValidatorUtils.getValueAsString(bean, field.getProperty());
    String file = new String(value);
    file = file.toLowerCase();
    if (!GenericValidator.isBlankOrNull(value)) {
    // log.info("Entra2");
    try {
    if (!file.endsWith(".jpeg") || !file.endsWith(".gif") ||
    !file.endsWith(".jpg")) {
    errors.add(field.getKey(),
    Resources.getActionMessage(request, va,
    field));
    //log.info("Entra3");
    return false;
    } catch (Exception e) {
    errors.add(field.getKey(),Resources.getActionMessage(request, va,field));
    return false;
    return false;
    // return true;
    } else {
    return false;
    Remember to visit
    http://www.lloguerjove.com
    and
    http://www.alquilerjoven.com

  • How do I get the date of a file in an FTP?

    As stated in the subject.
    I am at wits end trying to get the date of a file from FTP(Stuck for days).
    I tried the "URLConnection" Class but could only get me the size of the file with "getContentLength()"
    "getContentDate()" & "getLastModified()" both give me a 0. They only works for files on HTTP but not FTP.
    Anyone has any simple solution on how to get the date of a file on FTP?
    Thanks in Advance.

    The FTP specification has long awaited the magical file meta-data access protocol, which never came. There is no FTP defined manner to obtain the date of a file. The common work-around is to get the containing directory list and <shudder> parse the format of the returned text for the target file and date. Since there is no standard directory listing format, there is no guarantee that you will be able to get that date, and your application would have to cry to the user for help.
    Some FTP applications, in addition to providing parsers for Unix/Linux and DOS/Windows directory list formats, also provide the user with a format definition script to parse whatever the user encounters.
    I hope you find this of some help.

  • I have tried to view videos created in premiere elements 10 and I get the following message: "this file type is not supported, or the required codec is  not installed.  When it opens there is a red screen in the monitor panel with Korean writing which als

    I have tried to view videos created in premiere elements 10 and I get the following message: "this file type is not supported, or the required codec is  not installed.  When it opens there is a red screen in the monitor panel with Korean writing which also appears in the place of each clip in the video.  I tried uninstalling and reinstalling premiere elements 10, but that did not have any effect on the video.  Do you have any suggestions?  I researched codec, but do not understand them at all.

    gloucester
    In case you did not find it, the following is a copy/paste of the Announcement on Premiere Elements 19/NVIDIA GeForce
    that appears at the top of this forum.
    Premiere Elements 10 NVIDIA Video Card Driver Roll Back
    If you are a Premiere Elements 10 user whose Windows computer uses a NVIDIA GeForce video card and you are experiencing
    Premiere Elements 10 display and/or unexplained program behavior, then your first line of troubleshooting needs to be rolling
    back the video card driver version instead of assuring that it is up to date.
    Since October 2013 to the present, there have been a growing number of reports about display and unexplained workflow
    glitches specific to the Premiere Elements 10 user whose Windows computer has a NVIDIA GeForce video card. If this applies
    to you, then the “user to user” remedy is to roll back the NVIDIA GeForce video card driver as far as is necessary to get rid of
    the problems. The typical driver roll back has gone back as far as March – July 2013 in order to get a working Premiere
    Elements 10. Neither NVIDIA nor Adobe has taken any corrective action in this regard to date, and none is expected moving forward.
    Since October 2013, the following thread has tried to keep up with the Premiere Elements 10 NVIDIA reports
    http://forums.adobe.com/thread/1317675
    Older NVIDIA GeForce drivers can be found
    http://www.nvidia.com/Download/Find.aspx?lang=en-us
    A February 2014 overview of the situation as well as how to use the older NVIDIA GeForce drivers for the driver roll back can be found
    http://atr935.blogspot.com/2014/02/pe10-nvidia-video-card-roll-back.html
    ATR

  • I am trying to get my Canon MP190 to print with Macbook, OS10.5.8. I used to use the printers utility file to check ink levels. Now am told must go to Apple for latest drivers, etc. Where do I go??I am lost.

    DesertCatVicki
    I am trying to get my Canon MP190 to print with Macbook, OS10.5.8. I used to use the printers utility file to check ink levels. Now am told must go to Apple for latest drivers, etc. Where do I go??I am lost.

    Printer and Scanner software available for download:
    http://support.apple.com/kb/HT3669?viewlocale=en_US

  • I am trying to download EndnoteX4 but keep getting the message 'no mountable file systems'.  What does this mean and how do I fix it?

    I am trying to download EndNoteX4 but keep getting the message 'no mountable file systems'.  What does this mean and how do fix it?

    jenitsallgood wrote:
    I am really unsure as to what I am doing wrong.
    Maybe you are doing nothing wrong and the problem is with the disk.
    Use SuperDuper or CarbonCopy Cloner
    to clone your system to an external drive.
    Then boot from your DVD go to Disk Utility and choose your entire drive > top icon in DIsk Utility.
    Go to Erase tab. Choose format: Mac OS Extended (Journaled). Click on erase. Now, install Lion and when you get to setup assistant choose to migrate from your external drive.
    This is slightly different than baltwo described and slighly longer but if there is any corruption on your disk a more through way to go, IMO.
    What baltwo is saying is to clone your volume over to an external hard drive with CCC reformat and clone it back. This will defragment the files and make them all contiguous but will not address any directory problems.
    Your choice. You can do it one way, then the other if it doesn't work out for you.

  • I am trying to get the free trial to cc but it said there seems to be a problem with the files (Error code: 205)

    I am trying to get the free trial to cc but it said there seems to be a problem with the files (Error code: 205) please help

    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • I am trying to install End Note for Mac I am getting the message 'no mountable file systems'?

    I am trying to install End Note for Mac I am getting the message 'no mountable file systems'?

    Hi
    This is the link it is endnote for mac from my university library site it is a referencing tool. http://moodle.uws.ac.uk/mod/page/view.php?id=132753

  • Siebel 8.0.0.12 Fix Pack; Unable to get the seed from binary file.

    Hello Folks,
    Can anyone throw some light into what action is required on my scenario.
    I have applied Fix Pack Siebel 8.0.0.12 on top of 8.0.0.11 SBA. After it is appled, I am facing a documented issue within the Release Notes for the 8.0.0.12 Fix Pack
    The issue is "UNABLE TO LAUNCH URL AFTER APPLYING SIEBEL 8.0.0.12". I tried the steps given with the MR document, however, I am still having this issue.
    I am also not sure what is expected at the step of; Run the following command: seedgeneratorutil myseed.dat abcdef .
    It's asking me for a value to enter for seed at command prompt. "Enter the seed":
    what I should give here. As an assumption values,I gave SADMIN and tried to launch but still shows up the same error
    Please Assit
    Steps Details from Release Notes:
    UNABLE TO LAUNCH URL AFTER APPLYING SIEBEL 8.0.0.12
    Component: Server Infrastructure
    Subcomponent: SWSE
    Product Version: Siebel 8.0.0.12
    Base Bug ID: 11938270
    **Users are unable to launch the URL after applying the Siebel 8.0.0.12 Fix Pack.
    **Use the following workaround to address this issue:
    Navigate to the eappweb/bin directory from the command line on the SWSE installation.
    Run the following command:
    seedgeneratorutil myseed.dat abcdef
    NOTE: In the example, myseed.dat is a filename. You can give any file name you wish.
    The myseed.dat file is generated in the eappweb/bin directory.
    Edit eapps.cfg to include the following parameters under the SWE section:
    seedfile = < complete path for myseed.dat >
    Bounce the web server.
    (For Linux only) Copy libmod_swe.so from the eappweb/bin folder to the web/ohs/modules folder
    Thanks
    Kumar

    Wilson,
    Thanks for your reply.I have repeated the steps and regenerated the error messages.
    Browser
    Message:
    An error occurred while trying to process your request. This error indicates a problem with the configuration of this server and should be reported to the webmaster (along with any errors listed below). We apologize for the inconvenience
    Initialization error:
    Unable to get the seed from binary file.
    Log
    2021 2011-09-20 23:23:01 0000-00-00 00:00:00 +0530 00000000 001 003f 0001 09 ss110920_7068 7068 7852 E:\sba80\SWEApp\log\ss110920_7068.log 8.0.0.12 [20444] ENU
    ProcessPluginState     ProcessPluginStateError     1     000000024e781b9c:0     2011-09-20 23:23:01     7852: [SWSE] Unable to get the seed from binary file.
    Eapps.cfg
    [swe]
    Language = enu
    Log = errors
    LogDirectory = $(SWSERoot)\log
    ClientRootDir = $(SWSERoot)
    SessionMonitor = False
    AllowStats = true
    LogSegmentSize = 0
    LogMaxSegments = 0
    DisableNagle = False
    seedfile = E:\sba80\SWEApp\BIN\80012seed.dat
    Thanks
    Kumar

  • Heey i bought an iphone 3gs about 2-3 months ago (used) today i blanked off the phone itself and then tried to get the newest update cuz i wasnt able to before so i did and now im locked out and it says sim failure invalid sim i can even get into it :(

    heey i bought an iphone 3gs about 2-3 months ago (used) was in mint condition well taken care of not even a scratch as soon as i got home i tried syncing it to my computer but didnt work it didnt even sync or notice my iphone software .. so i went to my friends and synced it there it has been working for music but videos wont work? but i didnt care  and then the pop up that says update so we would click it wait and it wouldnt work ever since ive had it so i left it like that so i went to my friend today i blanked it off the phone itself and then tried to get the newest update cuz i wasnt able to before so i did and now im locked out and it says sim failure invalid sim i can even get into it PLEASE HELP and cant get a new sim at the moment or take it into the apple store because i live about an hour and a half away from the city and rarley go to it please help me !!!!!!!!!!!!!!

    When I use find file http://www.macupdate.com/app/mac/30073/find-file (which does tend to find files that "Finder" can't), it's not coming up with any other itunes library files that have been modified in the past week, which I know it would have been - unfortunately, I don't have a very recent backup of the hard drive.  It would be a few months old so it wouldn't have the complete library on it....any ideas?  I'm wondering if restarting the computer might help but have been afraid to do so in case it would make it harder to recover anything...I was looking at this thread https://discussions.apple.com/thread/4211589?start=0&tstart=0 in the hopes that it might have a helpful suggestion but it's definitely a different scenario.

  • Ive just got a new iPhone4 and I am trying to get the App's ie games from my iPhone3 onto the 4 and retain the same levels that I have reached on the 3, The Apps have gone onto the 4 but its making me re-start everything from level 1?

    Ive just got a new iPhone4 and I am trying to get the App's ie games from my iPhone3 onto the 4 and retain the same levels that I have reached on the 3,
    The Apps have gone onto the 4 but its making me re-start everything from level 1?
    Ive paid $$ for the games and then more $$ within the games via iTunes for in game purchases and desperatly want the games on the 4 with the levels that I have reached on the 3!
    Can anyone help!! Please!!!! My Smurfs and Animals are starving Hahahaha

    Mate, it's good to hear that you have gotten the iPhone 4 but sorry to burst your bubbles. Not all games can have the "saved" data ported over.
    Normally when you save a game in iPhone, the memory used is in the flash memory of the device. Those that can be ported over, reason is due to the data being saved over the air and when you logged in on a new device, it recognises you via the userID.
    Maybe you can try to backup your iPhone 3, and restore the file onto your iPhone 4. Not too sure if that would brick your phone though.

  • HT1373 i have a broken desktop which had my itunes account on it. I am trying to get the information onto a new laptop and itunes programme but cannot. I also cannot get my iphone 5 to be recognized on the new itunes. HELP

    i have a broken desktop which had my itunes account on it.
    I am trying to get the information onto a new laptop and itunes programme but cannot. I have only managed to copy over some of my music as i had it on an external drive.
    I also cannot get my iphone 5 to be recognized on the new itunes.
    HELP

    iTunes as you see it in the application window uses a series of files and folders contained in the iTunes folder.  Some people make the mistake of only backing up their media in which case all you have is a bunch of media files without the iTunes structure.  In that case you have to build a new library yourself.
    What exactly do you mean "not recognized"?  The phone does not show up on the computer at all, or it does but it says it will wipe the phone?  The wipe the phone stuff is again because it cannot find the original library to which it was synced.  You need to transfer the entire iTunes folder from the old computer or the backup you made of it.
    What are the iTunes library files? - http://support.apple.com/kb/HT1660
    More on iTunes library files and what they do - http://en.wikipedia.org/wiki/ITunes#Media_management
    What are all those iTunes files? - http://www.macworld.com/article/139974/2009/04/itunes_files.html
    Where are my iTunes files located? - http://support.apple.com/kb/ht1391

  • How to get the URI of a file in a WAR

    Hi all,
    I have a deployed WAR.
    One of its files need to get the URI of another file in this war.
    In exploded format, application.getRealPath(thefilename) would do the
    trick. But it failed if the application is deployed in WAR archive.
    What's the workaround ?
    Note that I need the full path of the file since I need to read its
    content and parse it as XML using DOMParser that requires the full URI ..
    Any help appreciated ..
    mona

    I have a piece of code that does this that looks like this:
    InputStream inStream =
    <ServletClassName>.class.getResourceAsStream("/foo.xml");
    InputStreamReader inReader = new InputStreamReader(inStream);
    And 'foo.xml' is put in the classpath either by placing it in a .jar file in
    the WEB-INF/lib directory or by placing it in a .jar file that is deployed
    with the webapp .war file in an .ear file and then referenced by the
    'Class-Path:' manifest directive in the META-INF/MANIFEST.MF file of the
    webapp.war file. Both ways work. I would think you could put 'foo.xml' in the
    WEB-INF/classes directory and that work work, too. But, I haven't tried that.
    Bill
    Mona Ramlawi wrote:
    Hi all,
    I have a deployed WAR.
    One of its files need to get the URI of another file in this war.
    In exploded format, application.getRealPath(thefilename) would do the
    trick. But it failed if the application is deployed in WAR archive.
    What's the workaround ?
    Note that I need the full path of the file since I need to read its
    content and parse it as XML using DOMParser that requires the full URI ..
    Any help appreciated ..
    mona

Maybe you are looking for

  • SLM2048 - Password problems with special chars

    Hi all, We´ve got a SLM2048 in use  (most current FW) and I wanted to apply our new password standards  onto that switch. So I changed the password of the user admin and used  special chars, which were =&!= and clicked update and save changes. I  now

  • Pacman on Windows

    I was a bit inspired by this thread, so I wanted to see if it was possible to compile pacman on a windows system. I did use cygwin so I guess I was cheating a bit... Anyway, it was possible with the exception for libdownload, I haven't looked into ho

  • IPhoto issues after upgrading to OS X Mavericks!!

    I just upgraded to the OS X Mavericks on my imac and when I open up iphoto I get a message that says: Your photo library will not be readable by previous versions of iPhoto after the upgrade.  Then it gives me the option to quit or upgrade!  It alrea

  • PL/SQL data input validation

    Does anyone have example pl/sql code to validate input of a phone number into a table of, for example, CUSTOMERS ?

  • MSI R9 270x and problems with switching power-saving modes

    hi,I bought this video card but now I began to twitch screen sometimes when switching video card power saving modes it all happens in a game, or at the sites but not on the desktop how to disable power saving mode so that it always runs at maximum fr