Make an image of height h and width w

Hi all,
I want to create an black or any colored image of height" h "and width "w" ,how can I do that ?
Thank you.

Hi,
these articles may help you:
http://www-128.ibm.com/developerworks/library/j-begjava/index.html
http://javaalmanac.com/egs/java.awt.image/CreateBuf.html
On the second page read also related examples
L.P.

Similar Messages

  • Applescript to resize images by BOTH length and width?

    I've searched for this, so please forgive me if I've somehow missed it.  I'm looking for an Applescript that will resize both the length and width of an image.  Ideally, I'd just like to save it to my desktop and drop images on it, resizing them to 250x166 pixels.  Is this possible?  I've seen scripts for length OR width, but nothing that will do both.  I know, the images will be out of proportion, but for what I'm doing, that won't be an issue.  Any help is greatly appreciated!

    Your request is a little unusual, which may be part of your problem.
    The issue is that, usually, when you resize an image you want to scale it proportionally to maintain the same aspect ratio. Otherwise you end up distorting the image in one direction.
    For example, if your image is, say 250 x 84px and you just double the height to get 166px, the image will distort and probably not look like what you wanted.
    So what you want is probably a combination of scale, crop and/or pad. Scale proportionally increases or decreases the image's dimensions. crop trims an image to a certain size, and pad expands an image's boundaries to fill the space. Anything more than that requires additional thought as to what you want the image to look like.

  • Is it possible to make an image of a MBP, and run it as a virtual machine?

    Is it possible to create an image of an exitsting MBP, transfer the image to another system or server, and run that image as a virtual machine?  If so, how?
    Thank you

    Mac OS X will not run in a virtual machine, except as 10.6 Server:
    https://discussions.apple.com/docs/DOC-6841

  • How to make background image scalable

    I am working on my site and I am constructing it using only
    external CSS. I am looking for a different look than I have
    previously done and want to use an actual image for the back ground
    of one of the DIV containers rather than just a color. My problem
    has been since I want my site to be fluid I need to find a way to
    have the image scale with the container. I could have sworn I saw
    how to change this attribute during some online reading I had done
    but I can not find it. Can anyone here help?
    Dara

    Scaling images is usually a bad thing - they will lose both
    aspect ratio and
    image quality when you do.
    However, if you are willing to suffer these indignities, you
    can place an
    image into a div that is 100% height/width (of whatever the
    <div> tag's
    contaner is), and make the image 100% height/width as well.
    Depending on
    the layout, that could accomplish your goals.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Dara_BSI" <[email protected]> wrote in
    message
    news:f4vm0n$kei$[email protected]..
    >I am working on my site and I am constructing it using
    only external CSS. I
    >am
    > looking for a different look than I have previously done
    and want to use
    > an
    > actual image for the back ground of one of the DIV
    containers rather than
    > just
    > a color. My problem has been since I want my site to be
    fluid I need to
    > find a
    > way to have the image scale with the container. I could
    have sworn I saw
    > how to
    > change this attribute during some online reading I had
    done but I can not
    > find
    > it. Can anyone here help?
    >
    > Dara
    >

  • Height and Width of an image - URGENT!!!!

    how I make to catch the height and the width of an image being used one upload JSP?
    Since already I am thankful!

    Toss the image up in the air. Turn both of your hands so the palms face skyward and towards the image while keeping them next to each other. As the image descends into your palms, close both hands tightly around the image.
    No, seriously, what do you mean by catch the width and height of an image? I'm assuming you mean how does one determine the width and hieght, right? You can probably stream out of the posted request into a byte array which you could pass to a javax.swing.ImageIcon object. You could then call getIconWidth() and getIconHeight() to get what you want. This approach would work for GIFs and JPEGs.
    Cliff

  • How to resize and maintain height and width ratio IR image column

    Hello, I am upgrading from 3.2 to 4.1 reports that include images in report columns. I have had good success with this except for one thing. If the height and width is fixed it distorts the photos, and if I do not have fixed dimensions the image may be too large depending on the original dimensions of the :P1_PHOTO item which is File Browse... BLOB column. I do not want to restrict users ability to upload large image files, or files with different dimensions, but I want them to display as a thumbnail size proportional to the original dimensions in the report, or maybe I need a different approach? Report region template is No Template. I appreciate any suggestions.
    select decode(nvl(dbms_lob.getlength(photo),0),0,null,'<img src="'||apex_util.get_blob_file_src('P1_PHOTO',id)||'" height="75" width="75"/>') photo from table.
    I tried using percent i.e.: width="10%" that does not work.
    I have tried several variations of <style> in page HTML header to change column width, but the image size does not change.
    <style>
    td[headers="PHOTO"] {
    width:75px;
    </style>
    <style>
    #apexir_PHOTO{width: 75px;}
    </style>
    Thanks.

    Try to go with max-width / max-height. However, if you have IE browser, hang on for pain. For some ideas, some links:
    http://wordpress.mfields.org/2011/scaling-images-in-ie8-with-css-max-width/ (ignore object-fit, it is not yet supported on most browser)
    http://stackoverflow.com/questions/3915219/max-width-on-img-tag-not-working-in-ie8
    etc. Be sure to try out your chosen solution on the target browser(s)!
    IE is just nasty :(
    What i have done before is not to have my browser scale my images, especially when the images can be large(r) and you expect quite some traffic. All those extra (kilo)bytes won't help it load faster. I just added an extra column in the table, like photo_thumb, and create a scaled version of the uploaded picture when it is being inserted.
    For example, i have the following process on my apex page, and i'm using wwv_flow_files.
    Have some code:
    IF :P3_FIND_PHOTO IS NOT NULL THEN
       DECLARE
         v_id number;
         v_small_photo blob;
         v_large_photo blob;
         v_mime_type apxt_contacts_img.mime_type%type;
         v_content_type apxt_contacts_img.content_type%type;
       BEGIN
          SELECT blob_content a, blob_content b, mime_type, content_type
          INTO v_small_photo, v_large_photo, v_mime_type, v_content_type
          FROM wwv_flow_files
          WHERE name = :P3_FIND_PHOTO;
          IF lower(v_mime_type) NOT IN ('image/jpg', 'image/jpeg') THEN
             raise_application_error(-20001, 'File for upload is not a jpg!');
          END IF;
          -- Rezise the photo so that it is proportionally 125*125
          -- ordimage is an oracle type able to manipulate all sorts of pictures
          ordimage.process(v_small_photo, 'maxScale=125 125');
          -- If contact is of type personnel, then no need to store
          -- a large photo since it wont be displayed
          IF :P3_CONTACT_TYPE_ID = 2 THEN
            v_large_photo := NULL;
          END IF;
          -- Delete previously uploaded picture
          IF :P3_ID IS NOT NULL THEN
             DELETE FROM apxt_contacts_img
              WHERE contact_id = :P3_ID;
          END IF;
          -- Insert the data into the contacts_img table as a
          -- SELECT from WWV_FLOW_FILES
          INSERT INTO apxt_contacts_img
          (contact_id,
           image_name,
           mime_type,
           content_type,
           filename,
           small_photo,
           large_photo)
          VALUES
          (:P3_ID,
           :P3_LASTNAME,
           v_mime_type,             
           v_content_type,
           :P3_FIND_PHOTO,
           v_small_photo,
           v_large_photo);
          -- Remove the image from the apex wwv_flows_files table
          DELETE FROM wwv_flow_files WHERE name = :P3_FIND_PHOTO;
       END;
    END IF;

  • Where to make changes to calendar height, width, and misc changes

    Apex 4.2
    I have a page with a calendar on it. I have several issues with formatting the data within each cell. Currently, I use a substitution string to place the id in the calendar cell. Clicking the id will link to another page. What I notice is that for each id on a calendar cell (or date), it lists them one under the other. Is there any way to list them side by side? Also, I need to make changes to the calendar cells. I would like to expand the width and the height, but am not sure where to do this. Can anyone point me in the right direction of where to put this, and what to put to expand the height and width. Thanks in advance.

    In regard to the cell size, if using Chrome or FF you can use the Inspect Element tool to locate the relevant class for the table the makes the calendar - it will be the TD that already has a height defined. Then you could add the required CSS in the inline page properties.
    Details will depend on your theme.

  • Trying to determine the height and width of an image.

    Hi Everyone,
    I am currently trying to work out the height and width of a number of pictures. I have tried a couple of techniques. One involved using BufferedImages, which kept on throwing null pointer exceptions. So I am now tring to use the Image class from java.awt.Image. However I need to use an ImageObserver or some such thing, of which I have absolutely no knowledge. If there is anybody out there who knows how to gather the information I speak of from a number of photos, and is feeling kind enough to impart their knowledge to me it will be greatly appreciated. Thanks.
    Regards
    David

    Well, maybe your problem is loading in the images, but I'm assuming you know what your question is since I don't feel like going into what ImageObserver does (That's what google is for).
    Anyways, to get the height and width of an image you do this:
    You initialize your image:
    Image image = getImage("file.jpg")  //I don't remember the if this is correct, it's just my memory.To get the dimensions"
    image.getWidth();
    image.getHeight();If these return 0 it's more than likely because the image hasn't loaded correctly, which is why you need ImageObserver (IIRC there is a better API in the new ImageIO library, check the API).
    Best of luck.
    Virum

  • Height and Width of an image

    Hello All,
    I wanted to fnd out the width and the height of an image (.jpg).
    Please could anybody let me know if there are any function modules or any other ways to find it out.
    Thanks and Regards,
    Sushmitha

    Hi Vikrant,
    I am using fileupload UI element.
    I wanted to determine the height and width of the image internally in webdynpro application, after which I can allow them to save.
    Thanks and Regards,
    Sushmitha
    Edited by: Sushmitha S on Jun 19, 2009 1:49 PM

  • Height and width of image loaded into blob?

    i am loading images into my database which is all working fine. in parts of my app i am displaying these images so i am wondering is there a way to get the dimensions (height an width) of the image you are loading in so that when it comes time to display you can scale as needed but the aspect ratio is the same so then the image is not distorted by just putting some random values for height and width.
    <br><br>
    eg
    instead of
    <br><br>
    select decode(file_type,'I','<imge src="OWNER.download_file?p_file=' || nvl(file_id,0) ||'" height="100" width="100" />','') from project_file
    where file_id = :P31_FILE_ID
    <br><br>
    i want to replace 100 with values from columns in table that were loaded at time of save
    Message was edited by:
    victorp

    thanks scott. is it correct to say that this example is storing the image at whatever size the user puts in the width and height boxes on screen? thats what it looks like to me anyway. i see there are functions to get these but does the user have to enter them still? it will be just what i need if indeed I do need it!
    Yes, that's correct. Of course you could modify the code so that you choose the size of the image, and not allow the user to change it.
    Thanks,
    - Scott -

  • How do I view the height and width of an image as I adjust the crop handles

    How do I view the height and width in pixels of an image as I adjust the crop handles before I actually crop the image?

    If you are in Photoshop CC, go into Preferences, click Interface, and turn on Show Transformation Values. In the picture below, setting it to Top Right means the pixel height and width appear to the Top Right of the Crop tool pointer.
    (Edit: The picture only shows Height because the bottom edge is being dragged. If a corner was being dragged it would say H and V.)

  • How to make an Image in Adobe Muse  100% height ?

    100% width, it's ok; but I don't find how to make a 100% height image (wich follows my browser height)?
    I work with adobe Muse CC 2014
    thanks !

    You can use the image as browser fill and then set the position of image such that it remains to its position. This can be used as a workaround for using image as browser height.
    Thanks,
    Sanjit

  • Animated Height and Width

    I'm trying to write lingo, that tells a certian object, upon
    the mouse leaving, to scale down by x amount. However I want it to
    be animated and happen over time. But I want it to all be in Lingo,
    within the cast member. I have it looking like this right now, but
    this just makes it go from one size, immediately to a smaller size.
    Like I said, I would like this to happen over a period of say, .5
    seconds.
    on mouseLeave me
    sprite(2).height = 438
    sprite(2).width = 292
    end
    I'm doing this for something like a portfolio. You can roll
    over images and they get larger, but when you roll off of them,
    they get smaller. I just want them to get smaller over time, and
    not immediately. Any help would be great. Thanks.
    ~Quadpolar

    Since mouseLeave only happens once it can't easily be used to
    animate
    something... so, you need to set up a system where the
    shrinking happens
    on an event that happens more often (like enterFrame)
    property pShrink
    on beginSprite me
    pShrink=0 --set it to not shrink when it starts up
    end
    on mouseLeave me
    pShrink=1 --start shrinking now
    end
    on enterFrame me
    if pShrink=1 then
    if sprite(2).height>400 then
    sprite(2).height=sprite(2).height-2
    sprite(2).width=sprite(2).width-2
    else
    pShrink=0 --now it will stop shrinking
    end if
    end if
    end
    This script kind of assumes that the sprite is square, since
    it adjusts
    the height and width evenly. Change those lines where the
    width and
    height are lowered by 2 to a greater number to make it go
    faster or a
    lower number to make it go slower (it has to be an integer,
    so 1 is as
    slow as it gets). Also, if the height and width are not
    equal, then
    adjust those same numbers accordingly. I also chose the
    number 400
    fairly arbitrarily.. that should be whatever height the
    sprite should be
    when you want it to stop shrinking.

  • Chaging Height and Width of POP UP in Webdynpro

    Hi,
    I want to change the height and width of pop up in webdynpro.
    Pop up is designed of view which is embeded in window.
    then i am calling
    lo_window         = lo_window_manager->create_window(
                         window_name                = 'UPLOAD_FILE'
                         title                                   =      'Upload target file'
                         close_in_any_case         = abap_true
                         message_display_mode  = if_wd_window=>co_msg_display_mode_selected
                         close_button                    = abap_true
                         button_kind                      = if_wd_window=>co_button_none
                         message_type                 = if_wd_window=>co_msg_type_none
                         default_button                  = if_wd_window=>co_button_none
                         is_resizable                      = abap_true
    I have also tried
      lo_window->set_window_size(   width = '999px' height = '999px'  ).
    But it is also not working..
    How i will resize the pop up.
    I have also change the view height and weight but the height is adjusted to some standard level.
    Looking for your feedback.
    Thanks
    Ankesh
    Moderator message: please have a look and ask again if necessary in the dedicated "Web Dynpro ABAP" forum.
    Edited by: Thomas Zloch on Feb 14, 2011 11:35 AM

    Hi Vedant,
    check the below given thread
    Is there anyway to make a popup window MODAL in APEX using JavaScript
    Hope this will helps you,
    Regards,
    Jitendra

  • Increase swf file height and width...

    Hello guys
       I am trying to increase a swf file height and width so it can fit better in my screen. I don't want to rework on everything again in my fla file because it's big hassle. (changing background size makes every symbol off). Are there anyway to do it? Thanks a lot!

    you could load your swf into an empty movieclip/loader in another swf.  when loading is complete you can resize your target movieclip/loader.

Maybe you are looking for