CreateClonedGdPictureImage and CreateClonedGdPictureImageI?
CreateClonedGdPictureImage and CreateClonedGdPictureImageI?
Can anyone tell me what is the difference between the CreateClonedGdPictureImage and CreateClonedGdPictureImageI function? From reading the manual, it seems quite vague. It says the CreateClonedGdPictureImageI version of the function that creates a clone that is indepedent of the source image. However, I tried releasing the source of the first non-I version of the function and the clone version is still alive in memory. Then again, why should a cloning function ever result in keeping another reference to the same image in memory? That seems to defeat the purpose of cloning, altogether. I'm not sure if I just don't understand the wording of the manual or what, but I am not quite sure what the difference is between these functions. Can anyone help me understand this? For now, I suppose it is safer to call the CreateClonedGdPictureImageI version of the function, because I want to make a duplicate of an image that is independent of the source image. I don't quite get what the manual is saying here.
Re: CreateClonedGdPictureImage and CreateClonedGdPictureImag
Anyone have any idea?
Re: CreateClonedGdPictureImage and CreateClonedGdPictureImag
Hello.
We've rewrote the documentation of these 2 methods. Here the new content:
CreateClonedImage()
Kind regards,
Loïc
We've rewrote the documentation of these 2 methods. Here the new content:
CreateClonedImage()
CreateClonedImageI()Creates a new GdPicture Image and initializes it with the contents of another GdPicture Image to minimize memory usage.
If the image to clone is a multibitmap image, this function will clone only the selected bitmap and will create a single frame image.
This function creates a new GdPicture image and initializes it with the contents of the source image until a modification is applied to the cloned image.
Consequently the pixel data of the cloned image can be released from the memory if the image source is released!
If you expect to have 2 independent bitmap stored in the memory you have to use the CreateClonedGdPictureImageI function.
Do not use this function if you intend to release the source image from the memory before the cloned image.
Hope this clarify. Let me know if there is something unclear.Creates a new GdPicture Image and initializes it with a copy of the contents of another GdPicture Image.
The newly created image will be independent of the image source.
Kind regards,
Loïc
Who is online
Users browsing this forum: No registered users and 2 guests