Please specify what version of the library you are using: [3.1.1]
Please specify what version(s) of PowerPoint you are targeting: [PowerPoint for Mac 16.38]
Applying flipV and flipH would flip the generated image elements vertically or horizontally.
Image stays the same as if no property was added. It works as expected for Text, only images have this problem.
Use the properties flipV = true or flipH = true in an image object
This should be a pretty straight forward fix.
in gen-objects.ts need to update this:
// STEP 3: Set image properties & options
// FIXME: Measure actual image when no intWidth/intHeight params passed
// ....: This is an async process: we need to make getSizeFromImage use callback, then set H/W...
// if ( !intWidth || !intHeight ) { var imgObj = getSizeFromImage(strImagePath);
newObject.options = {
x: intPosX || 0,
y: intPosY || 0,
w: intWidth || 1,
h: intHeight || 1,
rounding: typeof opt.rounding === 'boolean' ? opt.rounding : false,
sizing: sizing,
placeholder: opt.placeholder,
rotate: opt.rotate || 0,
}
to
// STEP 3: Set image properties & options
// FIXME: Measure actual image when no intWidth/intHeight params passed
// ....: This is an async process: we need to make getSizeFromImage use callback, then set H/W...
// if ( !intWidth || !intHeight ) { var imgObj = getSizeFromImage(strImagePath);
newObject.options = {
x: intPosX || 0,
y: intPosY || 0,
w: intWidth || 1,
h: intHeight || 1,
rounding: typeof opt.rounding === 'boolean' ? opt.rounding : false,
sizing: sizing,
placeholder: opt.placeholder,
rotate: opt.rotate || 0,
flipV: opt.flipV || false,
flipH: opt.flipH || false,
}
Just opened a PR for this, #824
Thanks @luism-s - it's slated for the 3.4.0 release
Most helpful comment
This should be a pretty straight forward fix.
in gen-objects.ts need to update this:
to