Pb : When adding pictures to my presentation, it seems that the PictureId auto-generated by the api is always the same, so not ‘Unique’ as stated in the documentation.
Presentation pres = new Presentation(path);
Picture pic = new Picture(pres,“1.jpg”); Picture pic2 = new Picture(pres,“2.jpg”); Picture pic3 = new Picture(pres,“3.jpg”);
My source Powerpoint file has already 2 Pictures in it (with PictureIds 2 & 3) … The 3 newly added pics have all the same PictureId (2), which correspond to one existing Picture.
Different pictures have unique id. Two pictures with identical size, format, crc32 (and some additional info) considered to be equal and have the same id.
Did you create source presentation in MS PowerPoint? In any case, could you send this ppt and 3 images to my email please? I would like to check it by myself because it’s very strange.
Picture pic = new Picture(pres,“1.jpg”); Picture’s constructor doesn’t really add picture to the ppt. It just create it in the memory and PictureId is undefined on this stage.
pres.Pictures.Add(pic); After you add picture to the real ppt’s Pictures collection it can calculate own Id and PictureId = 4 now.