fix(core): Word-Export — Logo-Seitenverhältnis korrekt (tatsächliche Pixel-Dimensionen)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas Reitz 2026-03-14 10:12:09 +01:00
parent 8fc894c74c
commit 1a222edb46

View file

@ -609,16 +609,16 @@ export class ProfileExportService {
// Platform-Logo
if (platformLogo) {
try {
const logoBuffer = await sharp(platformLogo)
.resize(120, 40, { fit: 'inside' })
const { data: logoBuffer, info: logoInfo } = await sharp(platformLogo)
.resize(140, 50, { fit: 'inside', withoutEnlargement: true })
.png()
.toBuffer();
.toBuffer({ resolveWithObject: true });
leftParagraphs.push(
new Paragraph({
children: [
new ImageRun({
data: logoBuffer,
transformation: { width: 120, height: 40 },
transformation: { width: logoInfo.width, height: logoInfo.height },
type: 'png',
}),
],