Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 08, 2016, 02:04:40 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Dynamic Resize?  (Read 4192 times)

S0789300

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 23
    • View Profile
    • Donate to Member
Dynamic Resize?
« on: March 12, 2009, 01:24:49 PM »
Hey - this is my first post on the forums (I think...) and wanted to know if there was a way to resize a captured image via command line or the screen capture methods (like -compress #)?

I am integrated screenshot captor in an autoit script but it seems to struggle sometimes on smaller screenshots.

Cheers

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dynamic Resize?
« Reply #1 on: March 12, 2009, 01:27:49 PM »
can you elaborate a bit more about what you want to do?

S0789300

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 23
    • View Profile
    • Donate to Member
Re: Dynamic Resize?
« Reply #2 on: March 12, 2009, 02:27:22 PM »
Yes - I am taking a screenshot of a small area in a window that will contain roughly 0-20 words that I want to OCR - I am using your Screen Captor to capture the screen then using other languages, such as Autoit to run the OCR algorithm.

However, the region is relatively small and the OCR has trouble because of its size - I was wondering if I could capture the image, magnify it (by increasing its size by a percentage) and then run my OCR options. So I was wondering if there is a screen captor method to do this.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dynamic Resize?
« Reply #3 on: March 12, 2009, 02:41:15 PM »
well certainly you can resize the image from within screenshot captor (hit ctrl+G or choose Resize from the Edit menu), but it sounds like you might benefit more by finding a 3rd party commandline resizer tool and then configuring it from the screenshot captor Tool menu,

S0789300

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 23
    • View Profile
    • Donate to Member
Re: Dynamic Resize?
« Reply #4 on: March 12, 2009, 02:54:28 PM »
I am using captor in another script I am writing like this:

      $sSwitches = ' -compress ' & $quality & '""'
      $sSwitches &= ' -save "' & $sTargetImage & '"'
      $sSwitches &= ' -captureregion ' & $ul_pos_x & ' ' & $ul_pos_y & ' ' & $br_pos_x & ' ' & $br_pos_y+4
      $sSwitches &= ' -exit'

This all works - I just want to know if there is a method like -compress or -capture that will allow me to resize with something like -size 200% or something.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dynamic Resize?
« Reply #5 on: March 12, 2009, 05:09:45 PM »
ah.. are you using the MiniCap commandline tool?

I could add resizing commandline options to that if people think it would be useful.

S0789300

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 23
    • View Profile
    • Donate to Member
Re: Dynamic Resize?
« Reply #6 on: March 12, 2009, 05:27:06 PM »
That would help me at least VERY much. As I think OCR and other applications could benefit if they are using screen captor on small windows.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dynamic Resize?
« Reply #7 on: March 12, 2009, 05:28:56 PM »
MiniCap is related to Screenshot Captor but it helps to remember they are separate programs, otherwise you confuse me!

I will add commandline resizing options to MiniCap.

S0789300

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 23
    • View Profile
    • Donate to Member
Re: Dynamic Resize?
« Reply #8 on: March 12, 2009, 05:51:28 PM »
Ah sorry  :(

And thank you!

Could you please inform me when the changes are made? I will implement it immediately.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dynamic Resize?
« Reply #9 on: March 12, 2009, 06:54:07 PM »
Ok try the new version of MiniCap -- see help file for the new options:

-resizexp PERCENTAGE
resize x dimension to PERCENTAGE% of its original value (y will be scaled to preserve ratio if no y resize value specified)

-resizeyp PERCENTAGE
resize y dimension to PERCENTAGE% of its original value (x will be scaled to preserve ratio if no x resize value specified)

-resizex WIDTH
resize x dimension to exactly WIDTH pixels (y will be scaled to preserve ratio if no y resize value specified)

-resizey HEIGHT
resize y dimension to exactly HEIGHT pixels (y will be scaled to preserve ratio if no y resize value specified)

« Last Edit: March 12, 2009, 06:55:57 PM by mouser »

S0789300

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 23
    • View Profile
    • Donate to Member
Re: Dynamic Resize?
« Reply #10 on: March 12, 2009, 08:20:45 PM »
Terrific - I will give it a shot!

do I need to input the PERECNTAGE% as an integer from 0-100 or a string 0%-100%?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Dynamic Resize?
« Reply #11 on: March 12, 2009, 08:28:16 PM »
0-100

dont use %