{
  "id": 12659,
  "title": "Batch resizing images in Windows",
  "url": "/competitions/diabetic-retinopathy-detection/discussion/12659",
  "author_name": "sfin",
  "post_date": "2015-03-02T15:25:08.187000",
  "votes": 1,
  "comment_count": 0,
  "views": 856,
  "content": "<p>If you are using Windows and want to batch resize images (probably to smaller size) then you can use following nice script:<br>http://www.sergeyv.com/Projects/ResizeImageScript.aspx</p>\n<p>To get it &amp; run it do the following:<br>1. Download link at the web page does not work at least in my browser. Therefore just copy paste the script at the end of page (starting from row <strong>&lt;job id=&quot;ResizeImage&quot;&gt;</strong>) to file&nbsp;resize_image.wsf</p>\n<p>2. Modify resize_image.wsf file row&nbsp;<br><strong>var fileMask = &quot;jpg&quot;</strong> <br>to&nbsp;<br><strong>var fileMask = &quot;jpeg&quot;</strong></p>\n<p>3. Then create&nbsp;to script folder run.bat file containing following:<br>resize_image.wsf /indir:&quot;C:\\pictures&quot; /width:512 /height:512</p>\n<p>where c:\\pictures must be folder containing jpeg files (it does not process sub-folders) and width and height are wanted target resolution.It creates subfolder c:\\pictures\\512x512 so it does not overwrite existing files. I have found out that approximately starting from 512x512 resolution there is enough information to do some &quot;accurate&quot; modelling :)</p>\n<p>4.&nbsp;Execute run.bat file at the folder</p>",
  "messages": [
    {
      "id": 65244,
      "postDate": "2015-03-02T15:25:08.187Z",
      "content": "<p>If you are using Windows and want to batch resize images (probably to smaller size) then you can use following nice script:<br>http://www.sergeyv.com/Projects/ResizeImageScript.aspx</p>\n<p>To get it &amp; run it do the following:<br>1. Download link at the web page does not work at least in my browser. Therefore just copy paste the script at the end of page (starting from row <strong>&lt;job id=&quot;ResizeImage&quot;&gt;</strong>) to file&nbsp;resize_image.wsf</p>\n<p>2. Modify resize_image.wsf file row&nbsp;<br><strong>var fileMask = &quot;jpg&quot;</strong> <br>to&nbsp;<br><strong>var fileMask = &quot;jpeg&quot;</strong></p>\n<p>3. Then create&nbsp;to script folder run.bat file containing following:<br>resize_image.wsf /indir:&quot;C:\\pictures&quot; /width:512 /height:512</p>\n<p>where c:\\pictures must be folder containing jpeg files (it does not process sub-folders) and width and height are wanted target resolution.It creates subfolder c:\\pictures\\512x512 so it does not overwrite existing files. I have found out that approximately starting from 512x512 resolution there is enough information to do some &quot;accurate&quot; modelling :)</p>\n<p>4.&nbsp;Execute run.bat file at the folder</p>",
      "votes": 1
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "65244": ""
  }
}