-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Hi, i have a problem with this library when creating a presentation.
When adding two different images to the slides the two images show the first image i added
var myobject= myobjectService.GetById(id, true);
var output = Path.GetTempFileName();
var presentation = Presentation.Create(output);
presentation.SlideHeight = 19.05.CmToPixels();
presentation.SlideWidth = 27.517.CmToPixels();
var Slide = new Slide();
var imagePath = Path.Join(Directory.GetCurrentDirectory(), $"myobject_{id}.png");
var imageBytes = Convert.FromBase64String(myobject.Photo);
FileIO.WriteAllBytes(imagePath, imageBytes);
var width = 0;
var height = 0;
// in the real code i get the size of the image here
var image = new Image(imagePath)
{
Name = "ImageX",
X = 180.0,
Y = 128.0,
Width = width,
Height = height
};
Slide.AddImage(image);
var Logo = new Image(Path.Combine(Directory.GetCurrentDirectory(), "logo.png"))
{
Name = "Logo",
Height = 4.27.CmToPixels(),
Width = 1.98.CmToPixels(),
X = 0.18.CmToPixels(),
Y = 0.13.CmToPixels()
};
Slide.AddImage(Logo);
presentation.AppendSlide(Slide);
presentation.Save();
presentation.close();When i download my slide here the two images are of myobject. Photo but if i swap the code to do the logo first both uses the logo.
I also checked the two images are different on the disk itself
Version used : 25.6.2
Metadata
Metadata
Assignees
Labels
No labels