Skip to content

unexpected x_scale and y_scale when using AddPictureFromBytes #691

@p581581

Description

@p581581

Description

here is my code:
f.AddPictureFromBytes(sheetName, fmt.Sprintf("A%d", index), fmt.Sprintf(``{"print_obj": true, "lock_aspect_ratio": false, "locked": false, "positioning" : "oneCell", "x_scale": %2f, "y_scale": %2f, "x_offset":1, "y_offset":1}``, xScale, yScale), "image", ".jpg", bytes)

Steps to reproduce the issue:

  1. I used excelize for pasting picture on excel , and it worked perfectly.
  2. update excelize
  3. got wrong scale

Describe the results you received:
Pictures display with wrong scale, and it's not what I set

Describe the results you expected:
Just like before

Output of go version:

go 1.12

Excelize version or commit ID:

Commit: 6962061200e2198acc39392c35344d1826268f34 [6962061]
Parents: 821b90d1f0

Environment details (OS, Microsoft Excel™ version, physical, etc.):

win 10
excel 2019

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions