Hdiutil doesn't resize image

I'm trying to add files to an existing .dmg image.
Several pages on the net suggest to do the following to achieve this:
1. hdiutil convert foo.dmg -format UDRW -o foo-rw.dmg
2. hdiutil resize -size <size> foo-rw.dmg
3. Mount foo-rw.dmg
4. Update foo-rw.dmg
5. Unmount foo-rw.dmg
6. hdiutil resize -sectors min foo-rw.dmg
7. hdiutil convert foo-rw.dmg -format UDBZ -o foo-bz
This makes a lot of sense to me and works. At least to a certain degree. If I just add small files to the image and thus let out step 2, everything is fine. If I try to resize the image that works as well, but I can't get the image bigger than 1245192 blocks, while this page (http://www.applepedia.com/Turnyour_OS_X_install_CDs_into_an_installDVD) suggest to bump the size up to 2 gigabytes.
What am I doing wrong?
Regards,
myce
Mac OS X (10.3)

JWindow is the Swing equivalent of java.awt.Window (and actually derives from it)

Similar Messages

  • Resize image code doesn't work for some JPGs

    Hi. I'm using the below code to resize images and store them on the server. However, with some JPGs, the resize produces a reddish tint on the image. Any ideas what could be causing this? Here's the original image: http://www.unctv.org/tWxkBbq_10M6wKRRL/PNCWWD01.jpg and here's what it produces afterward: http://www.unctv.org/tWxkBbq_10M6wKRRL/PABDFC01__1289231445291.jpg
    Photoshop CS5 is used to produce the JPG input for this app. Thanks.
    public BufferedImage resizeVeryHigh(InputStream inputStream, File resizedFile) throws IOException {
      BufferedImage bufferedImage = null;
      try {
          Image newImage = ImageIO.read(inputStream);
          int newWidth = (int)this.targetWidth;
          ImageIcon imageIcon = new ImageIcon(newImage);
          Image image = imageIcon.getImage();
          Image resizedImage = null;
          int iWidth = image.getWidth(null);
          int iHeight = image.getHeight(null);
          // This code ensures that all the pixels in the image are loaded.
          Image temp = new ImageIcon(resizedImage).getImage();
          // Create the buffered image.
          bufferedImage = new BufferedImage(temp.getWidth(null), temp.getHeight(null), BufferedImage.TYPE_INT_RGB);
          // Copy image to buffered image.
          Graphics g = bufferedImage.createGraphics();
          // Clear background and paint the image.
          g.setColor(Color.white);
          g.fillRect(0, 0, temp.getWidth(null), temp.getHeight(null));
          g.drawImage(temp, 0, 0, null);
          g.dispose();
          // Encodes image as a JPEG data stream
          FileOutputStream out = new FileOutputStream(resizedFile);
          JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
          JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bufferedImage);
          param.setQuality(1.0f, true);
          encoder.setJPEGEncodeParam(param);
          encoder.encode(bufferedImage);
      catch (Exception e) {
            this.error = e.getMessage();
          return bufferedImage;
    }Edited by: oneworld95 on Nov 8, 2010 11:34 AM

    I don't know anything about the jpeg encoders, but I do see code that doesn't make any sense to me:
    Image resizedImage = null;
    int iWidth = image.getWidth(null);
    int iHeight = image.getHeight(null);
    // This code ensures that all the pixels in the image are loaded.
    Image temp = new ImageIcon(resizedImage).getImage();What is the point of creating an ImageIcon from a null image?
    int newWidth = (int)this.targetWidth;I don't see where you actually use this variable, so how does the image get resized?
    For more help create a [url http://sscce.org]SSCCE, that demonstrates the incorrect behaviour and maybe someone will take a look at it.

  • Upload and Resize Image not inserting filename in database

    I have a form that I created using the insert record form wizard. One of the fields is a file field and my form enctype is set to multipart/form-data. I then used the upload and resize image behavior and set the parameters. When testing the form the file uploads to the correct directory but no entry is made into the database for that particular field. The other fields are entered into the database just fine. If it helps, here is the code generated before the  tag:
    <br />
    <br /><?php require_once('../../Connections/test.php'); ?>
    <br /><?php<br />// Load the common classes<br />require_once('../../includes/common/KT_common.php');<br /><br />// Load the tNG classes<br />require_once('../../includes/tng/tNG.inc.php');<br /><br />// Make a transaction dispatcher instance<br />$tNGs = new tNG_dispatcher("../../");<br /><br />// Make unified connection variable<br />$conn_test = new KT_connection($test, $database_test);<br /><br />// Start trigger<br />$formValidation = new tNG_FormValidation();<br />$tNGs->prepareValidation($formValidation);<br />// End trigger<br /><br />//start Trigger_ImageUpload trigger<br />//remove this line if you want to edit the code by hand <br />function Trigger_ImageUpload(&$tNG) {<br />  $uploadObj = new tNG_ImageUpload($tNG);<br />  $uploadObj->setFormFieldName("picture");<br />  $uploadObj->setDbFieldName("picture");<br />  $uploadObj->setFolder("../images/");<br />  $uploadObj->setResize("true", 120, 0);<br />  $uploadObj->setMaxSize(1500);<br />  $uploadObj->setAllowedExtensions("gif, jpg, jpe, jpeg, png, bmp");<br />  $uploadObj->setRename("auto");<br />  return $uploadObj->Execute();<br />}<br />//end Trigger_ImageUpload trigger<br /><br />// Make an insert transaction instance<br />$ins_team = new tNG_insert($conn_test);<br />$tNGs->addTransaction($ins_team);<br />// Register triggers<br />$ins_team->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1");<br />$ins_team->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);<br />$ins_team->registerTrigger("END", "Trigger_Default_Redirect", 99, "../team.php");<br />$ins_team->registerTrigger("AFTER", "Trigger_ImageUpload", 97);<br />// Add columns<br />$ins_team->setTable("team");<br />$ins_team->addColumn("id", "NUMERIC_TYPE", "POST", "id");<br />$ins_team->addColumn("sort", "NUMERIC_TYPE", "POST", "sort");<br />$ins_team->addColumn("name", "STRING_TYPE", "POST", "name");<br />$ins_team->addColumn("title", "STRING_TYPE", "POST", "title");<br />$ins_team->addColumn("description", "STRING_TYPE", "POST", "description");<br />$ins_team->addColumn("picture", "FILE_TYPE", "FILES", "picture");<br />$ins_team->setPrimaryKey("id", "NUMERIC_TYPE");<br /><br />// Execute all the registered transactions<br />$tNGs->executeTransactions();<br /><br />// Get the transaction recordset<br />$rsteam = $tNGs->getRecordset("team");<br />$row_rsteam = mysql_fetch_assoc($rsteam);<br />$totalRows_rsteam = mysql_num_rows($rsteam);<br />?>

    If the reason is about memory, warning message should be happened when upload the image, because "show thumbnail" means resize at second time, how come you failed to resize the picture that system let it upload succeed at the first time by the same resize process?
    upload procedure
    a.jpg: 2722x1814, 1.2mb
    upload condition: fixed width 330px, 1.5mb
    "upload and resize" a.jpg -> file upload -> "resize engine" -> passed (but not work and no warning message)
    "show thumbnail" a.jpg -> "resize engine" -> failed (not enough memory)
    it doesn't make sense.
    and you miss an important key point, I upload the same picture myself, and resize work, so I said it happened at random, and that's why I am so worried.

  • Is it possible to make a fixed size page in muse, so it doesn't resize?

    I want to make a fixed size page (pic1),
    but there always an extra space on the bottom… pic2

    Thank you for reply - I will check it out…
    Date: Wed, 18 Dec 2013 09:07:46 -0800
    From: [email protected]
    To: [email protected]
    Subject: Is it possible to make a fixed size page in muse, so it doesn't resize?
        Re: Is it possible to make a fixed size page in muse, so it doesn't resize?
        created by Zak Williamson (Adobe) in Help with using Adobe Muse CC - View the full discussion
    Assuming the screenshots are of the same page, the one that's taller is either taller because the minimum page height has been changed or due to some page content (that's not marked as a Footer Item) being located in the new space. This may be an empty text frame or the transparent area of a widget, text frame or other object.
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5941664#5941664
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5941664#5941664
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5941664#5941664. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Help with using Adobe Muse CC at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • 'Auto resize image' 'Settings' dialog box controls

    I have a signature that contains an avatar image (size 120px by 120px)
    Every time I 'Send' an 'Auto Resize Image' > 'Settings' dialogue box pops up
    How can I bypass this as its becoming annoying.
    Most emails (98%) do not contain any other embedded or attached images.
    This only started to happen after upgrading to latest version of Thunderbird, was never an issue before.

    Doesn't sound like a standard Thunderbird pop up as I've not come across it.
    Do you by any chance have an addon /extension such as Auto Resize Image?
    * https://addons.mozilla.org/en-US/thunderbird/addon/auto-resize-image/
    if yes, disable it and retest to see if message stops.
    Check you are using an up to date version.
    check to see if there is some settings you can use to 'not ask again' or similar. Can't say exactly as I do not use it.
    I use the standard TB settings to adjust for sizing when I originally insert an image.

  • Resizing images in mail

    Does anyone know how I can resize an image that I have dragged into a mail. I assumed that mail would offer me a drag resize of images but this doesn't seem to be available or is it?
    thanks

    Hi Bob
    I seemed to have hit a nerve.
    Agreed mail is not primarily a graphics application however as I am sure you are aware these days many applications do do jobs that they initially didn't. Your assertion would suggest that web browsers should not display images. After all the first web browsers as I am sure you will remember did not show images as images were not supported in html.
    Why on earth should I have to open a separate application just to reduce the size of an image by around 35% when nearly all other mail applications quite rightly happily allow the user to resize images to whatever size you like.
    Whats the equivalent of a pedant in technology?
    ezra

  • IPad Air not resizing images properly

    Just picked up and iPad Air this morning. It's acting strangely.  When I try to set a photo for wallpaper, it's not sizing it properly.  I have even tried resizing images in a photo program, but that doesn't help.  Anyone?

    Resizing in iPhoto did not work.
    See the link below for the correctly sized iPad wallpapers.
    It looks like the image is cut down from the too and bottom.
    http://www.gottabemobile.com/2013/10/24/get-mavericks-ipad-air-wallpapers-device s/

  • Resizing Images for Websites

    I am creating a website for a Family Farm. I was wondering if there is any good way to resize images using iPhoto for quicker loading times in websites. Most of the images I want to use are from a digital camera and are huge files.

    Welcome to the Apple Discussions. As Dalya mentioned using the File->Export->File Export menu option will let you set the pixel dimension and quality level (amount of jpeg compression) to achieve small files for web use.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Looking for script to auto resize images

    I have a commerce site and we have 3 sizes of images thumb
    nail, standard
    and fullsize. Ideally I'd like to maintain just one image
    folder so I don't
    have to keep synching and batch resizing.
    I'm looking for a script that would resample/resize images on
    the fly so I
    only have to maintain one directory. Does anyone know of such
    a script? It
    doesn't have to be free.
    Thanks

    .oO(robbie)
    >I have a commerce site and we have 3 sizes of images
    thumb nail, standard
    >and fullsize. Ideally I'd like to maintain just one image
    folder so I don't
    >have to keep synching and batch resizing.
    >
    >I'm looking for a script that would resample/resize
    images on the fly so I
    >only have to maintain one directory. Does anyone know of
    such a script? It
    >doesn't have to be free.
    What language? With PHP for example it's quite easy using the
    GD
    functions.
    Another way would be to use an external software. I prefer
    Paint Shop
    Pro for all image-related stuff. Things like creation of
    thumbnails in
    different sizes can easily be automated by using its own
    scripting
    language (based on Python).
    Micha

  • Resizing Images for a Beginner

    When I teach students who are just learning to use a digital camera, one of their first questions is:  How can I make my images smaller to attach to an email?
    At this early stage, I want something easy.  On Windows OS, it is just a right/click away when they get a resize image option.  Is there a similarly easy way for my Mac students to accomplish this feat before they get further into their learning?
    I tried opening the image in Preview and using the pull down menu when saving it as a jpeg, but the slider has to go all the way to the lowest quality before an image even gets to 500k.
    Thanks for your input.
    Mary Lou

    Mary Frost wrote:
    I am hoping that there is a method which doesn't require that each image be opened in software and then resized and resaved.  Eventually, these adults will be using Photoshop Elements and will learn how to properly resize images.
    I wish there were as easy a method on Mac as on Windows.
    Will all versions of the Mac OS include some version of Preview?
    Mary Lou
    As far as I know yes.  The latest OS has it as well as Mountain Lion which is what I have. 

  • Resizing images for idvd

    Hello,
    I've not yet tried to resize images yet . . . I've just opened idvd and bring the pics in. Most are in the 1.5 to 3.2 mg size. When burned to dvd and viewed on tv (4:3) they are passable. Maybe a little soft.
    A post said, "Reformat your images to 100 dpi by the screen size (720x540 pixels for 4:3 TV aspect ratio or 854x480 pixels for 16:9 aspect ratio)."
    Question: Is the 720 the width or height? So what about portrait shots? All my shots show 72 dpi in Photoshop. Are this suggesting that I increase to 100 dpi?
    Thanks for help.

    Resizing them probably won't do anything since iDVD resizes them for you. However I guess there is the change that when iDVD resizes them down to the proper TV screen size, it doesn't do as good a job compared to you doing it in Photoshop, so I guess worth the experiment (please report back your findings).
    720 is the horizontal size, but you don't want to use that. You want to use 640. 640 square computer pixels are equal to 720 "rectangular pixels" on a TV. iDVD will do the conversion from 640 square pixels to 720 "rectangular pixels" for you. If you make it 720 on the computer, then iDVD will still convert it and distort your photo.
    I put "rectangular pixels" in quotes because a normal TV is an analog device so there are not really "pixel" but an analog signal.
    Ignore the DPI or PPI (dots per inch or pixels per inch) setting. That setting means absolutely nothing when displaying on a TV or on a computer monitor. It is a printing specification, so it doesn't matter what you set it as, it will look the same on the computer or the monitor (e.g. 640x480 at 72 dpi will look exactly the same as 640x480 at 100 dpi). All you care about are the absolute number of pixels (such as 640 by 480) in the photo.
    Patrick

  • What software do you reccomend for resizing images for web ?

    I am looking for some software to help resize images on my mac to post online eg 470x 707 at 72 dpi (something similar to Faststone for PC would be good ) >Any recomendations?

    72 dpi doesn't mean anything in terms of video and 470 x 707 is a rather peculiar size, what is the source of the video and what exactly are you trying to achieve.

  • Resizing Images in InDesign CS5

    Hi,
    I jumped from CS3 to CS5. In CS5, when I resize images they enlarge or decrease from the center and no longer resize from where my curser pulls from.  Is there a setting that I can change for the image to resize from my curser and not the middle of the image?
    Lindsey

    I'm goint to presume you mean you are grabbing a sizing handle and dragging. Behavior has not changed. The point opposite the one you grab should remain fixed and all others should be moving in or out (if you're holding the shift key) depending on which direction you drag. In this case the proxy doesn't affect things. Are you seeing something different, or doing something different?

  • Resize images, console program

    I'd like to write a console program to resize images.
    I've been reading about bufferedImage, but I'm not sure that would work from the console?

    jai looks interesting, but it doesn't look very platform portable. Is there no other way to do it?

  • Which approach to use for resizing image

    There are two ways of resizing images as I know:
    1. image.getScaledInstance(width,height,hint);
    Using hint like Image.SCALE_AREA_AVERAGING gives somehwat satisfactory resizing.
    2. static BufferedImage resize(GraphicsConfiguration gc, BufferedImage source, int w, int h, Object hintValue) {
    BufferedImage result = gc.createCompatibleImage(w, h, source.getTransparency());
    Graphics2D g2 = result.createGraphics();
    g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hintValue);
    double sx = (double) w / source.getWidth(), sy = (double) h / source.getHeight();
    g2.drawRenderedImage(source, AffineTransform.getScaleInstance(sx, sy));
    g2.dispose();
    return result;
    where the hint passed is RenderingHints.VALUE_INTERPOLATION_BILINEAR ;
    Now which of the two method method should I use-using image.getScaledInstance() or using AffineTranform ? opr is there any other way which is faster but provides good result?
    i am creating an image editor, so the GUI dialog will have oprtion to choose the algorithm. I want the method which provides better result yet faster.
    Tanveer

    http://forum.java.sun.com/thread.jsp?forum=20&thread=522483

Maybe you are looking for