Hi there, we are using PTImageStampCreate’s function to add images, but when the number of images on the same page is 10 or more the app uses significant amount of memory on opening ( sometimes on scrolling). it feels really laggy.
Does compressing images help a bit ?
Is there any other way to add an image includes all (edit, move, delete) features ?
Hello, I’m Ron, an automated tech support bot
While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:
Which version of our SDK are yo using? In the latest version of the SDK (9.1.0, released September 8th), we now give he user the option to stamp in something other than the full size resolution. If you are stamping many large images, they do need to be decompressed in order to be displayed, which can take a significant amount of memory. Stamping lower resolution images helps with this.
Please let me know if this helps.
hi @James1 thanks for your reply but we use custom version of your app and I have to call that function manually. I tried to compress using heic it really made difference about 3-5 seconds in that freezing time. but it is still slow and feels bad.
I compared it with XODO app and find that in xodo while you scroll on the page with images, the images do not immediately render in its highest resolution which gives smooth scroll experience.
I really wonder if there is an another way to add an image includes all (edit, move, delete) features ?
You could try compressing the images which you pass into the function to see if there is any performance improvement there. The [-stampImage:atPoint:] API just takes a UIImage so you can pass in a compressed image.
Another approach would be to use the
PTStamper class to stamp the images instead of using
PTStamper gives you more control over the stamping process.
We have sample code for the stamper class here:
And you can also look at the PTStamper usage in the
PTImageStampCreate source code which is in available in the SDK download: