Create Thumbnail From Flv File

Hi to all,
I want to create a thumbnail image from flv video file.
I am reading the flv file via FileInputStream as a byte array and i try to create a image file from that array. But i get only Block Image. Is there anyother way to do it
import java.io.*;
import java.awt.*;
class sample
public static void main(String ars[])
try
Image temp = null;
File f=new File("sample.flv");
FileInputStream in=new FileInputStream(f);
byte a[]=new byte[(int)f.length()];
int offset = 0;
int numRead = 0;
while (offset < a.length
&& (numRead=in.read(a, offset, a.length-offset)) >= 0) {
offset += numRead;
temp = Toolkit.getDefaultToolkit().createImage(a);
java.awt.image.BufferedImage bufferedImage =
          new java.awt.image.BufferedImage(800,600, java.awt.image.BufferedImage.TYPE_INT_RGB);
     java.awt.Graphics g = bufferedImage.createGraphics();               
     g.setColor(java.awt.Color.white);
     g.fillRect(0, 0, temp.getWidth(null),temp.getHeight(null));
     g.drawImage(temp, 0, 0, null);
     g.dispose();
     f = new File("sample1.jpg");
     FileOutputStream out = new FileOutputStream(f);
     com.sun.image.codec.jpeg.JPEGImageEncoder encoder = com.sun.image.codec.jpeg.JPEGCodec.createJPEGEncoder(out);
     com.sun.image.codec.jpeg.JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bufferedImage);     
     param.setQuality(7.0f, true);
     encoder.setJPEGEncodeParam(param);
     encoder.encode(bufferedImage);
catch(Exception ex)
System.out.print(ex);
Please Help to Me

You may start looking at external tables if it is that you want. Here is a link.
http://otn.oracle.com/pls/db10g/db10g.drilldown?remark=&word=external+tables&book=&preference=

Similar Messages

  • Choose File Form Data Create Spreasheet From Data Files

    I am following the tutorial for LC 8 and when I get to the topic titled "Collecting the data in a spreadsheet" it says to "Choose File > Form Data > Create Spreadsheet From Data Files".
    However, when I try to follow that path I do not see a "Form Data > Create Spreadsheet From Data Files" menu option.
    What am I not doing properly? How do I accomplish this task?
    Thanks!

    Thank you so much Paul. I have been trying all day to locate the method by which I could create a spreadsheet using the pdf submit route. I suppose the tutorial in CS4 should have been changed to reflect the changed explanations, but I guess that would be difficult to do. Anyway it worked and I can now do the analysis I need from my customers (lots of pupils!).
    Best wishes,
    Kevin Palmer

  • How to create database from .sql file

    how to create database from .sql file..?? i put the sintax query in a sql file.. and i want to call it in java code..
    ho to do it..??

    why do you want to do this from java?
    i just don't see the point.
    find your dba and have him/her run it for you

  • Creating spreadsheet from data files

    Why do I get the numbers in square brackets e.g. f[0].p1[0].Name[0], when I collate data using the 'Create spreadsheet from data files' command. I only want to export object names as column titles in Excel. This driving me mad!

    I got the same problem as Zali.I really need some one help regarding regarding this topic.

  • Auto create thumbnail from pdf

    Hi all, can anyone assist with writing a script to automatically create thumbnails of a saved PDF and then move that thumbnail onto a NAS SMB shared volume?
    thanks
    KL

    Take advantage of Automator, and create a workflow that prompts you for a PDF, and then generates thumbnail images of that PDF into a Desktop folder. The workflow will overwrite any thumbnail images associated with the PDF, if you rerun it on the same PDF.
    Here is the AppleScript to generate the thumbnail(s) from the PDF, and access the first thumbnail. I am not using a Server here, so that is missing from the AppleScript, but should be a Finder move/copy from your thumbnail folder to the server destination address. The applescript can be saved as an Application on your Desktop.
    set pdfimage to {}
    set workflowpath to "OSXHD:Users:viking:Desktop:pdf2img.workflow"
    set qtdworkflowpath to quoted form of (POSIX path of workflowpath)
    set command to "/usr/bin/automator " & qtdworkflowpath
    set pdfimage to do shell script command
    -- get first thumbnail path
    set thumbnail to (second paragraph of pdfimage as text)
    display dialog thumbnail
    Launch Automator, and choose to make a new workflow. Save this workflow to your Desktop, or anywhere you like. For this example, it is sitting on my Desktop. Build your Automator workflow with the following Library actions:
    Files and Folders - Ask for Finder Items
    PDF - Render PDF Pages as Images
    Files and Folders - Move Finder ItemsI created a new folder on the Desktop to place the generated thumbnails
    Here is what the Automator actions look like in the finished workflow.

  • Bridge to create thumbnails from web application

    Hi all,
    I'm looking for a solution to create thumbnails on my web application server (eps, ai, psd.. files).
    Did you think that it a good idea (and possible) to use Bridge on a server (I have a licnese for InDesign server) to generate thumbnails with a jsx script ?
    Thanks,
    Cedric

    I have no idea about using Bridge on a server, but here is an example of creating thumbnails.
    This example should be run from ExtendScript Toolkit, it will generate thumbnails for all (that it can)  filetypes in the selected folder.
    #target bridge
    var files = app.document.visibleThumbnails;
    for(var a in files){
        if(files[a].type == "file"){
        var Thumb = new Thumbnail(files[a]);
        var orientation = Thumb.rotation;
        app.synchronousMode = true;
        var bm = Thumb.core.thumbnail.thumbnail;
        app.synchronousMode = false;
        if(bm.width <1) continue;
        bm = bm.rotate(orientation);
        Name = decodeURI(Thumb.spec.name).replace(/\.[^\.]+$/, '');
        var target = new File(app.document.presentationPath + "/Thumb-" + Name + ".jpg" );
        bm.exportTo(target);

  • Capture image and get info from flv file

    Hi everyone
    would apprichate help from any one who can tell me how and is
    their any batch software for win\linux that can prepare xml file
    with movie length and jpg\gif image capture of one of the frames
    (if i can set to to frame 20 and not 1 as dafualt) out of flv file.
    its for academic fms project and we have thousands of courses
    which we recorded and got them on flv, and need the data for the
    catalog.
    so - if any one can pls assist, got something ready or just
    tell me how to do it, we really will apprichate it.
    10x very much !

    FLVMDI will create the XML file for you (it will have
    additional nodes, but it will have the info you need). FFMPEG will
    extract the images for you.
    I'm not sure if either of those programs do batch
    runs.

  • Cannot create iView from PAR file

    I am trying to create an iView from PAR file. But when I select the option,
    "Portal component - create an iView from a portal component contained in a deployed portal archive (PAR) file"
    and click next, I get the following error.
    Error______________________________________
    Step 1:  Portal Archive Selection
    No templates to display. You are not assigned to any existing templates.
    I have portal_configurator and developer roles assignmed to myself. Which other role do I need? I cannot get admin role.
    Note: Other users with admin roles can create iViews.

    Hi
    What is your portal version details ?
    In EP 7.0 you do not have the option -- New From PAR.
    So to create IView from Par, you should select the option New --> IView and then there will be an option to select par file.
    Otherwise
    1.Check if your par file is deployed on server.
    2. Check the portalapp.xml, if you have configured your components properly.
    Cheers
    Chinmaya
    reward for helpful answers

  • How to create Exe From Data files

    my requirement is very much similar to registration of file extension.
    lets say if you have a file with extension .xyz then you can decide which program should invoke .xyz but instead of any other extension i need that extension of my file should be .exe
    and when user double clicks on this exe files the file should get opened with my own program, but if the file is true .exe (i.e. Created by some other program) then it should not get invoked by my program...
    i dont know how to do this but i know this is possible
    e.g. Flash can create an exe files from their .swf files which when opened run using flash player (but it doesnt get fooled by any .exe file. also flash exe files have different icons)
    similarly winzip can create self extracting exe files from .zip files
    can anybody help me out
    the files i am trying to create will have numeric data in spreadsheet format and when launched the player will show the data in animated format.
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

    i think i will briefly describe the things; what exactly i want to acheive
    my client will have one application which will acquire data and log them into files. but he want to distibute these files to other people who will not have the application developed by me.
    he wants that file should show the reports in specific way. but to see those reports end user should not be required to install any specific application.
    i know that this thing is possible. as per msdn developer can include any data (text, graphics, audio, video etc.) inside exe in the form of resource file. (and there are programs are avaiable on internet which allow to extract, edit, add resource files inside exe)
    what i dont know right now is how i can access the resource file inside exe
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

  • Extra zeros in numeric fields when I create spreadsheet from data files

    I created a form with Live Cycle, and then in Adobe I use the option "create a spread sheet from data files" to import the answers to a xls file.
    I have two problems with this action: the first one is that I get 8 extra zeros in each numeric field, the second one is that fields are ordered by type and not by appearance.
    I tried a different approach importing directly in Excel, in that way there are no extra zeros and the order is correct, but I get just one form each time, and in a "stairways" fashion (i. e. first field in A1, second in B2, and so on)
    I'd appreciate any help

    Where do you find the command "create a spread sheet from data files"?
    Anyway i have a similar problem: when i export data in a .csv file and than i import it in excel, i always get 8 extra zeros... how can i solve the problem?

  • Creating PDF from Office files in Acrobat X for Mac

    Dear All - I just installed the Mac version of Acrobat X (with the newest dot release upgrade).  I was surprised to find (on my installation anyway) that the only way to create a PDF from an Office document is from within Mac Office, using the print command to create an Adobe PDF. 
    There is no way to use Create PDF from the initial screen or the menu bar of Mac Acrobat X to convert an existing .doc, .docx, .xls, .ppt, etc. file  - the dropdown list of supported formats doesn't include any of the Office formats.  Nor does dragging an Office file's icon onto Acrobat's icon work.
    I know from the video tutorials on adobe.com that the Windows version of the Acrobat X product does support direct conversion of Office files without having to open them first in Office.  Is there something screwy with my particular installation, or is the exclusion of Office conversion in the Acrobat application (as opposed to through Office) a "feature" of the Mac version for some reason?
    Many thanks.
    Bob

    That's a good question, but I don't have a definitive answer. I know that Adobe has claimed to be working on providing PDFMaker capabilities (at least partially) for the Mac, but we haven't seen anything yet. PDFMaker was dropped as of version 9, but even before then, it was considerably less capable than the Windows version.
    I believe there are techincal limitations on the Mac that prevent them from integrating it with Microsoft Office products. I know that on WIndows, Office needs to be installed for PDFMaker to work, so Acrobat (PDFMaker) relies in part on MS Office functionality. If the same APIs aren't available on the Mac, there's not a lot they can do apart from implementing a conversion process that does not rely on MS Office, which sounds to me like a considerable undertaking.

  • Can't create PDF from Word file

    I may be missing some functionality or that functionality may not exist.
    I'm running Acrobat Pro 9.2 and MS Word 2004 (11.5) on OSX Leopard 10.5.8. I want to create a PDF from a Word file but NOT using the Print dialog. I want to either create it in Acrobat using File > Create PDF > From File or create it from within Word using the Acrobat menu/toolbar. This is so that it will end up as a tagged PDF.
    However, I don't have an Acrobat menu or toolbar in Word. I thought Acrobat was supposed to have installed these into MS Office when I installed Acrobat. And when within Acrobat if I select File > Create PDF > From File and choose a Word file, I get a message "Acrobat could not open 'filename.doc' because it is either not a supported file type or because the file has been damaged". This happens for all Word files.
    Looking in Acrobat > About Adobe Plug-Ins... under Convert2AdobePDF it says 'Loaded: no'.
    Are these two methods of converting Word files to PDFs something that can only be done in the Windows version of Acrobat? Or is there a plug-in or update I can download to install this missing functionality?
    Thanks for your help,
    Mark

    Keep your Office2004. But Office 2008 does have a way to create PDF's from within  the word and excel Programs.
    It works better than through the AdobePDF Printer, or through the Apple Print menus save as PDF. (Unless you have X.6.x Snow leopard)
    One thing it gets around is a long standing Problem Acrobat has had with word and excel since Word 6.0.1.a/Excel 5.0.1a. Acrobat doesn't know how to interpert Word Page section Breaks. Chopping up a word/excel document in to multiple PDFs that have to be merged back together. MS came up with their own PDF Converter that gets around that problem.

  • Creating PDF from multiple files results in file name AND chapter name both appearing in TOC.

    And all the bookmarks in that chapter nest directly under the file name. I would rather have just the chapter title appear with no file name in the TOC and the chapter bookmarks nested under that.

    Hi tekwrite1955,
    This is an expected behavior. When you create a pdf from any file it will list the filename in the TOC.
    You have to manually edit the bookmarks.
    Regards,
    Rave

  • Create PDF from Multiple Files Error

    Running Acrobat 8.1.2 and InDesign CS3 8.0.2
    When trying to create a PDF from multiple files, I am getting an error with each file as it is opened by Acrobat to create the PDF file. The error reads:
    Invalid value for parameter 'using' of event 'exportFile'. Expected PDFExportPreset, but received "Standard".
    The files are also left open in InDesign afterward instead of being closed. Does anyone have any idea what might be causing this?
    Thanks.

    Did you upgrade your Office / Word installation?
    PDFMaker-compatible applications for Acrobat 7 with regards to MS Office:
    --| Office 2000
    --| Office XP
    --| Office 2003
    See:
    http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html 
    Be well...

  • DNG Profile Editor: Can't create profile from JPG file

    Guys, could you tell me why DNG Profile Editor fails to create color table using 4 colored circles ? It says "Unable to check white balance using gray patches. Please use the four color circles to identify the four corner patches of the chart and try again" even though I places four circles properly (it works with DNG files shot with my Nikon D700).
    I created this DNG file from JPG file by opening it in Camera Raw plugin and saving as DNG file. Original JPG was shot on camera of Samsun Galaxy S phone. I know I'm crazy but I want to have color profile for it All patches are properly exposed after slight correction of Exposure slider in Camera Raw.
    I'm using latest beta3 build
    Here is link to DNG and JPG file I'm trying to use
    http://www.box.net/shared/4v2rzlzjfp
    Thanks!

    If you convert your JPG to a DNG can you change the profile to the one you computed from the other JPG you converted to a DNG?
    Profiles are not for JPGs.  Profiles are for RAW files that ACR supports.  You can't (easily/ever) get a RAW file from your Galaxy S and Adobe doesn’t' support that RAW format even if you could.
    To see if your profiling is working, you can used the ColorCheck module from a trial version of Imatest that you download from www.imatest.com and look at the color-error.
    You can also try the Read_Color_CC24.jsx script from Rags-Gardner:
    http://www.rags-int-inc.com/PhotoTechStuff/ColorCalibration/

Maybe you are looking for