Using the Intelligent Rescale Demo

Opening an Image for Rescale

Intelligent Downscale

Intelligent Upscale

Coached Rescale (Intelligent Rescale with Applied Mask)

Coached Downscale (Intelligent Downscale with Applied Mask)

Coached Upscale (Intelligent Upscale with Applied Mask)

Opening an Image for Rescale

  1. From \LEADTOOLS 19\Bin\CLIB\Win32, launch ImagePF.exe

  2. Browse to select an image to resize

  3. On the Main Menu, select Image Intelligent Rescale
    The Intelligent Rescale Dialog will open:

Intelligent Downscale

LEADTOOLS Intelligent Downscale will calculate which horizontal or vertical chains of pixels contribute least to the important features of an image, and remove them first when resizing. This reduces image size without changing image colors, while preserving the "substance" of the image.

  1. On the right-hand side of the dialog, from the Downscale section, select a new width, height, or both.

  2. Choose the dimension of downscale needed (width or height).

  3. Choose downscale order from the Downscale Order combo box.

Note: You will get the best results (fewest image artifacts) if you alternately adjust Width and Height in proportion to key image features. For example, in an image with a lot of blank blue sky, first downscale Height to achieve maximum reduction. Then downscale width.

  1. Click Apply Downscale

  2. To return to the original image, click Reset.

Intelligent Upscale

LEADTOOLS Intelligent Upscale calculates which horizontal or vertical chains of pixels contribute least to the important features of an image, and then inserts them twice in the new enlarged image. This has the effect of expanding the background space between major image features, without distorting the features themselves.

  1. On the right-hand side of the dialog, from the Upscale section, select a new width, height, or both.

  2. Choose the dimension of upscale needed (width or height).

  3. Set the width and/or height insertion factor as 1.

  4. Choose new width or new height or both.

  5. Click Apply Upscale.

  6. If the resulting image is not smooth, click Reset to return to the original image. Then, increase the insertion factor, and repeat.

Tip:      By default, dark objects are weighted as "unimportant." This means that dark objects are usually affected (shrunk or grown) during downscale or upscale.
If you do not want dark objects to be affected, first negate the image, apply downscale or upscale, and then negate the image again to return to the colors of original image.

Coached Rescale (Intelligent Rescale with Applied Mask)

For even smarter rescale, you can designate areas to protect or remove during rescale. This allows you to maximize the space available in the image for important image features, while eliminating unimportant image areas.

Coached Downscale (Intelligent Downscale with Applied Mask)

  1. Follow Intelligent Downscale steps 1-3 above

  2. Select the Mask check box. This will enable the Freehand Draw tool.

  3. Using the Freehand Draw tool, select the area to be protected or removed.

Note: For best results, paint the mask area completely from one edge of the image to the other, including the object to be protected or removed:

Original Image

Wrong

Right

  1. To remove the object:
    1. In the Downscale section of the dialog, be sure that the Width or Height property is reduced enough to eliminate the object. For example, if you wish to remove an object that is approximately 100 pixels wide on the original image, you must reduce the width by at least 100 pixels.
    2. Select the Remove Object check box, then click Remove Object.

or

  1. To preserve the object, select the Preserve Object check box, then click Preserve Object. The Choose Color dialog will open.
  2. Select a color that does not exist in the original image. (This sets the COLORREF value.)
  3. Click Apply Downscale.
  4. If results are not satisfactory, to return to the original image, click Reset. Adjust Width/Height settings as needed, and try again.

Coached Upscale (Intelligent Upscale with Applied Mask)

  1. Follow Intelligent Downscale steps 1-3 above
  2. Select the Mask check box. This will enable the Freehand Draw tool.
  3. Using the Freehand Draw tool, select the area to be protected or removed.
  4. To remove the object:
    • In the Upscale section of the dialog, be sure that the Width or Height property is reduced enough to eliminate the object.
      For example, if you wish to remove an object that is approximately 100 pixels wide on the original image, you must reduce the width by at least 100 pixels.
    • Select the Remove Object check box, then click Remove Object.

or

  1. To preserve the object, select the Preserve Object check box, then click Preserve Object.
    The Choose Color dialog will open.
  2. Select a color that does not exist in the original image. (This sets the COLORREF value.)
  3. Click Apply Upscale.
  4. If the resulting image is not smooth, click Reset to return to the original image. Then, increase the insertion factor, and repeat.

For more information, refer to:

Image Processing: Intelligent Rescale

Programming with Intelligent Rescale

LBitmap::IntelligentDownScale

LBitmap::IntelligentUpScale

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C++ Class Library Help