mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-24 22:36:38 +02:00
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:
parent
8fc894c74c
commit
1a222edb46
1 changed files with 4 additions and 4 deletions
|
|
@ -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',
|
||||
}),
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue