Skip to content

@remotion/media-utils: New getImageDimensions() API#3733

Merged
JonnyBurger merged 3 commits intoremotion-dev:mainfrom
jkcs:feat/get-image-dimensions
Apr 19, 2024
Merged

@remotion/media-utils: New getImageDimensions() API#3733
JonnyBurger merged 3 commits intoremotion-dev:mainfrom
jkcs:feat/get-image-dimensions

Conversation

@jkcs
Copy link
Copy Markdown
Contributor

@jkcs jkcs commented Apr 19, 2024

close #3719
/claim #3719

I noticed that packages\docs\docs\5-0-migration.mdx was not included in the sidebar, so I manually deleted it after generating article.ts. I'm not sure if you need to publish it.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bugs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 19, 2024 10:12am
remotion ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 19, 2024 10:12am

@jkcs
Copy link
Copy Markdown
Contributor Author

jkcs commented Apr 19, 2024

I found that render-cards.mjs cannot run properly on a Windows system. It has two errors:

  1. The split function for line breaks does not correctly handle the change from \n to \r\n.
  2. The generated relativePath and id are separated by \\ instead of /.

Currently, I need to execute replaceAll('\\', '/') after generating id and relativePath.

@JonnyBurger JonnyBurger changed the title feat: add get-image-dimensions function @remotion/media-utils: getImageMetadata() function Apr 19, 2024
@JonnyBurger JonnyBurger changed the title @remotion/media-utils: getImageMetadata() function @remotion/media-utils: New getImageDimensions() API Apr 19, 2024
@JonnyBurger
Copy link
Copy Markdown
Member

Thanks a lot! Looks great 🙌🏼

I fixed the render-cards.mjs script now so next time it should work smoothly. Sorry about that and thanks for flagging it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement a getImageDimensions() function for @remotion/media-utils

2 participants