Magnifies or shrinks an image. Each direction (horizontal and vertical) can be adjusted independently. This operation works on all color depths supported by the opcode.
→ (Horz 2.5, Vert 1.0)
→ (Horz 0.8, Vert 1.25)
The uncompressed image to be processed must reside in the Get Queue prior to REQ_EXEC. Typically, the image will be fully contained in the Get Queue, but that is not a requirement. The output image will be placed into the Put Queue during REQ_EXEC.
Padding pixels present at the end of each line will be modified by this operation.
- Subcode is set to SF_SUBCODE_SCALE (16).
- u.SC16.HorizontalMagnification is set to the amount of horizontal magnification desired. Values above 1.0 will increase the width of the image, while values between 0.0 and 1.0 will reduce the size of the image. The new width will be equal to the original width, multiplied by this parameter. Valid values are floating point numbers between 0.0001 and 10,000 inclusive.
- u.SC16.VerticalMagnification is set to the amount of vertical magnification desired. Values above 1.0 will increase the height of the image, while values between 0.0 and 1.0 will reduce the size of the image. The new height will be equal to the original height, multiplied by this parameter. Valid values are floating point numbers between 0.0001 and 10,000 inclusive.
- Stride is set to the image line width in bytes including padding at the end of the line width or to 0. If Stride is 0 and PF_NoDibPad is set in PicFlags, the operation will compute the stride using: [ (PixelWidth*BitCount)/8 ]. If Stride is 0 and PF_NoDibPad is not set in PicFlags, the operation will compute the stride using: [ (((PixelWidth*BitCount)+31)&(~31))/8 ].
In addition to placing an output image into the Put Queue, this operation stores some output information into the PIC_PARM structure in the following locations.
- OutputStride is set, during REQ_INIT and REQ_EXEC, to the image line width in bytes including padding at the end of the line.
- BiOut is set, during REQ_INIT and REQ_EXEC, to the attributes of the output image. It will first be set to a copy of the Head structure with the PIC_PARM structure. Then, the biWidth, biHeight, and biSizeImage parameters will be adjusted (if necessary) to the new values.