Hi all
!
With Gimp, the most part of time I works on photos to simply add extra layers and export the result (maps, explanations, mechanisms, and so).
In this case I do not alter the original and keep it.
Recently I realized the most part of my XCF projects take more than 20MB per file vs the originals which take 2MB max.
After digging I understood the problem : projects keep the original raw uncompressed photo on a layer which is a waste of storage as I can include again the original.
In definitive I want to keep the original photo, the exported one and all that allowed to obtain the exported result.
I imagined an external batch process to open the targeted files, remove the usefulness layer, archive the original with the lighted project.
I discovered script-fu language (LISP scheme) and followed tutorial script-fu and experimented it with success.
But I did not found a way to achieve this : get the uncompressed layer size
I found the following procedures which are not "size related" :
- gimp-image-get-layer-by-name
- gimp-image-get-layer-by-tattoo
Is it possible to do this with script-fu ? Is it possible in another way ?
Extra question, is there a way to attach a file to a XCF project (I suppose no) like we usually do it with the email attachments method ? I hoped this could be achieved with an add-on ...
Thank you in advance for the time you will spend to me
.
With adelphity
lnj

With Gimp, the most part of time I works on photos to simply add extra layers and export the result (maps, explanations, mechanisms, and so).
In this case I do not alter the original and keep it.
Recently I realized the most part of my XCF projects take more than 20MB per file vs the originals which take 2MB max.
After digging I understood the problem : projects keep the original raw uncompressed photo on a layer which is a waste of storage as I can include again the original.
In definitive I want to keep the original photo, the exported one and all that allowed to obtain the exported result.
I imagined an external batch process to open the targeted files, remove the usefulness layer, archive the original with the lighted project.
I discovered script-fu language (LISP scheme) and followed tutorial script-fu and experimented it with success.
But I did not found a way to achieve this : get the uncompressed layer size
I found the following procedures which are not "size related" :
- gimp-image-get-layer-by-name
- gimp-image-get-layer-by-tattoo
Is it possible to do this with script-fu ? Is it possible in another way ?
Extra question, is there a way to attach a file to a XCF project (I suppose no) like we usually do it with the email attachments method ? I hoped this could be achieved with an add-on ...
Thank you in advance for the time you will spend to me
![[Image: wink.png]](https://www.gimp-forum.net/images/smilies/wink.png)
With adelphity
lnj
I have questions to all your answers (Woody Allen)
Knowledge and ideas belong to everyone (noosphere) !