Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • npanguuluri 30 posts 57 karma points
    Sep 01, 2009 @ 18:52
    npanguuluri
    0

    Help to resize the images while uploading using zip upload tool...

    Hello,


    I am using the Zip Upload ( http://www.nibble.be/?p=55) for bulk uploading my images to the media folder.


    The control works great but i would like to know if there is a way where we can set the sizes of the images while uploading using  the zipupload tool (resize the images to a particualr height and width different from original sizes) in the same way as resizing the thumbnails using the <thumbnailSizes>200;500</thumbnailSizes>..if any one has done it ,can you please guide me or let me know how to get it .....


    Thanks !!!!

  • Ron Brouwer 273 posts 768 karma points
    Sep 01, 2009 @ 18:57
    Ron Brouwer
    0

    I don't know an easy way on how to do it during upload, but after that you can use
    http://our.umbraco.org/projects/imagegen

    Ron

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 01, 2009 @ 20:06
    Dirk De Grave
    0

    Hi npanguuluri,

     

    Zip upload works quite the same for uploading media as the standard upload field, and also has configuration options as you've specified

    <thumbnailSizes>200;500</thumbnailSizes>

    Of course, files will only be stored on disk and you'll never found out about the resized image from within the admin backend (You'll only find the 'real' uploaded image). Have you checked the /media/id folder (id to be replaced with id found for each uploaded file) whether the thumbnails have been created.

    Here's the piece of code that reads the config file that accompanies the control

    // Load config settings
    XmlDocument x = new XmlDocument();
    x.Load(Server.MapPath(umbraco.GlobalSettings.StorageDirectory + "\\umbDashboard.xml"));
    int fileNodeTypeId = int.Parse(x.SelectSingleNode("/dashboardConfig/zipUpload/fileNodeTypeId").FirstChild.Value);
    int imageNodeTypeId = int.Parse(x.SelectSingleNode("/dashboardConfig/zipUpload/imageNodeTypeId").FirstChild.Value);
    int folderNodeTypeId = int.Parse(x.SelectSingleNode("/dashboardConfig/zipUpload/folderNodeTypeId").FirstChild.Value);
    string imageExtensions = "," + x.SelectSingleNode("/dashboardConfig/zipUpload/imageFileExtensions").FirstChild.Value + ",";
    string _thumbnails = "";
    if (x.SelectSingleNode("/dashboardConfig/zipUpload/thumbnailSizes") != null)
    _thumbnails = x.SelectSingleNode("/dashboardConfig/zipUpload/thumbnailSizes").FirstChild.Value;

    (taken from http://umbracoext.codeplex.com/SourceControl/changeset/view/35482#58550)

    As a fallback, as Ron has suggested, you could have a look at Doug's excellent imageGen package!

     

    Cheers,

    /Dirk

     

  • npanguuluri 30 posts 57 karma points
    Sep 01, 2009 @ 20:18
    npanguuluri
    0

    Hey Dirk,

     

    I got that part for thumbnails figured out..I was just searching if any feature exists for the main images to be resized ...Suppose i am uploading a folder containing images of size 1000 x 800 , then i would like to know if there is a way to automatically resize them to 600 X 450 while using the zip upload tool.I By doing so the images would be of the dimensions 600 x 450 when saved on the disk so that i helps me to maintain a consistent image size when using the Zip Upload tool.

     

    Thank you

Please Sign in or register to post replies

Write your reply to:

Draft