How can you stretch an image using JMF API

How is it possible to strech or zoom the video using JMF API? Streching may not distort the resolution, but, zooming might as I imagiine.

You can zoom with something like this:
public void zoomTo(float z) {
     if (visualComp != null) {
          insets = getInsets();
          Dimension d = visualComp.getPreferredSize();
          d.width = (int) (d.width * z);
          d.height = (int) (d.height * z);
          if (controlComp != null)
          d.height += controlComp.getPreferredSize().height;
          setSize(d.width + insets.left + insets.right,
               d.height + insets.top + insets.bottom);
}I suposse visualComp is the visualComponent of a player and this zoomTo(..) method is in a Component so you can call to setSize(..) method.
Of course the float z is the scale of zoom.
... i hope!

Similar Messages

  • How can you upload an image to MYSQL using php?

    Ok this is a joint thread with one of my other ones because no one else  was posting on it, so I did not get what I needed, so, How can you  upload an image to mysql so when some one logs on to my site, they see  or can upload there own avatar, now there are loads of problems with  this, 1) many people don't know how, 2) It's not every day you try to  encode a image into mysql, 3) Letting people upload images into mysql  can cause traffic problem with people trying to log in. So that's it.

    Uploading images into MySQL is a bad idea, for more reasons than you mention. You should store the images in a directory on the server instead. But if you want to learn the hard way, here is the method:
    The mysql data type must be blob.
    The form enctype must be multipart, like this: enctype="multipart/form-data"
    The form input field myst be type file, like this: <input type="file" name="upload"/>
    Here is example code that prepares the variable $photodata to be inserted into the database.
      $uploadfile = $_FILES['upload']['tmp_name'];
      $photoname = $_FILES['upload']['name'];
      $uploadtype = $_FILES['upload']['type'];
      if ($uploadfile != "") {
    $tempfile = fopen($uploadfile, 'rb');
    $filesize=filesize($uploadfile);
    $width=getimagesize($uploadfile);
    $widthx=$width[0];
    $heightx=$width[1];
    if (($widthx > 102) or (heightx > 135)){
    $image_too_big = " but the image size was too large and was not submitted.";
    } else {
    $photodata = fread($tempfile, filesize($uploadfile));
    $photodata = addslashes($photodata);

  • How can you add an image in Mail without being an attachment?

    How can you add an image in Mail without being an attachment?
    In otherwords I'd like to put my logo in the email not as an attachment but as an image.
    Is there a simpel solution to this problem?

    PBN1 wrote:
    How can you add an image in Mail without being an attachment?
    You don't.
    It's not possible. The e-mail protocol is designed for text; anything else has to go as an attachment.
    Different mail clients (such as Mail.app, the mail client bundled with Mac OS X) may have different ways of handling such attachments, but they are still attachments. Each mail client has its own rules and methods, so one may display a picture as if it were in the body of the message, but another client may do something completely different.
    A way of faking it is to format your message in HTML (which is a kind of text). The image is hosted on a remote server, not added to the message; instead, you include a link to it in the body of the message, as you would when building a web page. (This is also what the two tips helpfully provided by X423424X do, except that the link to the image is added in the signature, rather than the body of the message.) What exactly happens to it is, again, at the discretion of the mail client. In my case, for instance, displaying images in HTML messages is turned off, and will stay resolutely off.

  • Please Help.  How can you monitor a directory using jndi connection to a ldap server?

    How can you monitor a directory using jndi connection to a ldap server? I
    want the ldap server to monitor the content change in a file system
    directory on another computer on the network. Can someone please help.
    Thanks
    Fred

    Hi,
    Why do you want to use LDAP for Hard disk monitoring..???
    U can do this by creating a MD5 checksum for all the files existing in some
    perticular
    directory and every hour or any configurable period u can recalculate the
    checksum
    to find out the change in the content.
    I guess all u need is to get the code for "updatedb" utility of Linux and
    instrument it for ur needs..
    Hope it helps...
    -aseem
    mr wrote:
    How can you monitor a directory using jndi connection to a ldap server? I
    want the ldap server to monitor the content change in a file system
    directory on another computer on the network. Can someone please help.
    Thanks
    Fred

  • How can you import AVCHD movies using iMovie '11?

    How can you import AVCHD movies using iMovie '11?

    H264 is one example of a codec used in MPEG-4 video encoding. Windows Media is a codec. Sorenson is a codec. DVPRO is ...etc....
    Play a source video file and do a get info on it and tell me what the audio and video details are.

  • How can you make an image adjustment on all images in a Stack

    If one had a stack of images that need a brightness adjustment. How can you preform the adjustment a stack of images that need the same amount of adjustment?
    Many times I have a stack of images that need a +10 brightness adjustment on them and it would save a lot of time if I could do it on a whole stack of images.

    good points, as l/s takes every adjustment ... including autolevels/exposure ... BUT DOESN'T make them auto to the next image(s), it just lifts the current image settings !!! which is fine for a five shoot series all at the same exposure, but not so much when it is not !!!

  • How can you create a user using mbean

    Or if you already created a user via console,
    how can you access it with mbean ?
    what is the domain, and type etc?
    Thanks
    netatta

    Thanks Wayne. I'll have to try that. Although I'm wondering, doesn't Oracle have plans to use one-way password encryption at some point? making this method of password retrieval break?
    I've also found the following article. It talks about how the OIM API can get an authenticated user session from the authenticated WLS session. It's tantalizing! But doesn't really match my use case or reveal the inner mechanics of how the OIM API gets what it needs from WLS; and therefore I don't think I can subvert that mechanism to do impersonation.
    http://fusionsecurity.blogspot.com/2013/01/authenticating-oim-apis-without-end.html
    Another approach I'm looking at, which works if all i want to do is fire up a session for one specific user (e.g. an unprivileged service account), is to use creds (username and password) stored in the WLS Credential Store (CSF). See appendix A in:
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/oim/oim_11g/developing_oim_custom_approval_process_for_resource_provision/developing_oim_custom_approval_process_for_resource_provision.pdf

  • How can you track my ipod using my icloud account

    How can i track my ipod using my icloud account?

    Use the computer browser with the link below:
    https://www.icloud.com/#find
    or use Apple free Find My iPhone app.

  • How can you make an image change every time you refresh a page?

    Hi.
    I've recently redone my website and was wondering how I could make the image on my main page change every time you refresh the page?
    Like is there a certain script you can use?
    Here's my website
    www.liamfawcett.com
    Thanks

    Copy & Paste the following JavaScript code between the <head> and </head> tags in your HTML document, in Code View of course.
    <script type="text/javascript">
    <!--//Random Banner image on Page Reload
    //store the images in arrays below
    images = new Array(5);
    images[0] = "<a href='http://www.example.com'><img src='some_image.gif' </a>";
    images[1] = "<a href='http://www.example.com'><img src='some_image.gif' </a>";
    images[2] = "<a href='http://www.example.com'><img src='some_image.gif' </a>";
    images[3] = "<a href='http://www.example.com'><img src='some_image.gif' </a>";
    images[4] = "<a href='http://www.example.com'><img src='some_image.gif' </a>";
    index = Math.floor(Math.random() * images.length);
    document.write(images[index]);
    //done
    // -->
    </script>
    In the array, change URLs (http://www.example.com) to your own links.  Change images (some_image.gif) to your own images.
    Save page.  Preview in browser.  Hit refresh (F5 or Ctrl+R) to see the images change.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • How can you print mirror image from word 2010 on the HP Photosmart c310 printer

    Trying to print mirror image from Microsoft 2010 on a windows 7 computer to the HP Photosmart C310 printer. Can not find an option. Please advise.

    Judith
    Perhaps you can enlighten us as to what "does not print correctly" actually means.
    Miss-spells your name? or what?
    How have you set up your Page set-up?
    It has to agree with how you are feeding the envelope in and what printer driver you are using.
    Peter

  • How can i generate BARCODE Images using JAVA Code

    Hello ,
    My requirement is to generate BarCode Images to Print using JAVA Code.
    User will give only
    1) String.as Input Parameter and
    2) Type of Encoding you want to apply on to the String.
    outPut : code should generate Bar Code Images as per the requirements.
    can any one help me out with jars ????? or any link which can provide me start.

    1) I have requriement like generate doc file with
    more than one barcode image on that document.???
    So?
    If your chosen "doc file" format supports inclusion of multiple images there's no problem.
    If it doesn't, choose another format.
    2) I am able to generate .doc file but in which
    format i should open that doc file.????
    The same format you used to create it.
    3) Main thing is how can i put more than one barcode
    image on that doc file????
    That would depend on the file format and the API used to create it.
    is any one faced the same problem or gone through
    same requirement.
    Almost certainly. And they solved it too, given the document I'm looking at right now which is an e-ticket for an airline that has many barcodes and other generated images on it.
    So keep on trying, grasshopper, and you may find enlightenment.

  • How can i grabb some image using an usb video grabber in Labview 7?

    How can i make a list with all video and audio devices?
    How to use DirectShow functions in Labview 7?

    Hi,
    I can help you out with the audio part of your question: the Windows API has a set of functions called waveOutGetNumDevs and waveInGetNumDevs that give you the number of available devices for input or output. Then you can use waveInGetDevCaps and waveOutGetDevCaps to get more information on each device; with some work you could get the manufacturer and formats supported.
    I have very limited knowledge on DirectShow; however it is based on COM so you shold be able to access it with LabVIEW's ActiveX capabilities.
    I hope this helps.
    Regards,
    Juan Carlos
    N.I.

  • How can you convert an image to ydbr format?

    Hello all. I can not work out how to simply input an image and convert it to ycbr and save it as a new image.
    Can anyone help please?
    Kind Regards

    OK I have also found this code:
    public static void rgb2ycbcr(int r, int g, int b, int[] ycbcr) {
              int y = (int)( 0.299 * r + 0.587 * g + 0.114 * b);
              int cb = (int)(-0.16874 * r - 0.33126 * g + 0.50000 * b);
              int cr = (int)( 0.50000 * r - 0.41869 * g - 0.08131 * b);
              ycbcr[0] = y;
              ycbcr[1] = cb;
              ycbcr[2] = cr;
    However I have no idea of how to use it. The source did not specify what all the parameters are. How can I use this in my code from a bufferedimage to displaying the new image?
    Thanks again.
    Looking forward to your answers (3 more Dukes added)

  • How can i open two chanel use JMF?

    i want have a capture card. if have four chanel.
    how can i open four camera in the same time?
    does JavaTV can do that?

    When you are in one app, press the home button and open another app. You can't see more than one app at a time, but you can have as many open as memory will allow.
    To quickly switch between the apps, double-click the home button. Active apps will be shown in the order you last used them. You can slide the active bar to see more of recent apps.

  • How can you bend an image round a path in Photoshop?

    Hello I would like to know how to bend an image to follow a particular path or shape in Adobe Photoshop CS4. The Warp tool produced the closest results I was aiming for, however it is difficult to shift one part of the image on screen without interfering with another area of the selection using this feature. I understand you can create a design in Adobe Illustrator, add it to the Illustrators brush toolbar and apply it to a determined path, although the toolbar does not appear to accept images. Could anyone help with a solution? (I am using Adobe Master Collection CS4). Thanks in advance

    although the toolbar does not appear to accept images.
    As it should be. You create wrap/ envelope objects for this in AI, but that's best discussed in their forum. Other than that I'm not aware of an easy way to do this in PS. using warping and distortion effects is indeed pretty much what you do...
    Mylenium

Maybe you are looking for