question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I am embedding images into the document but I am noticing if the orientation of the jpeg image isn’t correct. It is due to the EXIF metadata for orientation being something other than 1.

Would it be possible to specify rotation when creating the media object within drawingOptions:

const drawingOptions = {
  transformation: {
    rotate: {
      type: IMediaRotateType.Clockwise,
      value: 90,
    }
  }
}
Media.addImage(document, fileBuffer, actualWidth, actualHeight, drawingOptions)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
dolanmiucommented, Mar 15, 2021

Will be included in: https://github.com/dolanmiu/docx/pull/822

I took most of your API advice, I like transformation, however, I thought maybe it will be too much for the user if they have to specify clockwise or anti clockwise rotation. It increases complexity without providing too much value. rotation is a simple number attribute in degrees.

Thanks

0reactions
dolanmiucommented, Mar 18, 2021

i did not publish yet, its coming very soon though

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rotate image online - PineTools
Rotate image online. In Images | Keywords | Thanks to... Keywords: images pictures photographs photos rotates rotating clockwise counterclockwise.
Read more >
Rotate images in seconds for free! - iLoveIMG
Rotate IMAGE. Rotate JPG, PNG or GIF. Rotate only images with portrait or landscape orientation at once. Upload your file and transform it....
Read more >
Free Online Photo Editor | Rotate Image - LunaPic
Rotate Image Free Online Photo Editor. Photo, sketch and paint effects. For Tumblr, Facebook, Chromebook or WebSites. Lunapics Image software free image, ...
Read more >
Rotate image online - ResizePixel
With ResizePixel's free photo rotator, you can rotate a GIF, JPG, BMP, PNG, WEBP or TIFF image by 90 degrees left or right....
Read more >
Mirror and rotate image online - Img2Go.com
Rotate image files if they are upside-down to any degree you want. Additionally, mirror pictures either vertically or horizontally. All online & for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found