EmilDohne / PhotoshopAPI

A modern and performant C++20 read/write parser of Photoshop Files (*.psd and *.psb) with fully fledged Python bindings hosted on PyPi
https://photoshopapi.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
89 stars 9 forks source link

Smart Object #90

Open milqnomadu opened 1 month ago

milqnomadu commented 1 month ago

(1) I was trying to replace the image inside a smart object, save it and then export the psd as an image. Using psd-tools this isn't possible and the author said it is not planned (although it is massively wanted).

(2) Then tried instead to retrieve the information from the smart object and have it replicated in PIL: opacity, position, bbox, perspective and warp. However using psd-tools Warp I'm not able to retrieve.

Is it possible to either (1) or (2) with this repo?

Sorry if I disturbed you in any way, hope you have a great day!

EmilDohne commented 1 month ago

Hey @milqnomadu thanks for checking this repo out!

While its not possible currently it is planned to support all of these features although some are more involved than others.

This problem can be broken down into 3 separate problems I suppose:

I have recently been occupied with another project which I plan on completing within the next month allowing me to focus more on these features.

Im not sure how well versed you are in C++ but if you have some time to spare contributions are always welcome in any of these departments.

Hopefully this answers your question, unfortunately I dont think theres currently a project which has these features implemented but I am very interested in pursuing them :)

milqnomadu commented 1 month ago

Hey Emil, thank you so much for the response! I love your work and I'm so thriving for your contribution.

Unfortunately I'm incredibly ignorant on the subject as I'm 19yrs old from Italy and I'm just starting to explore these projects on my own. I just need something that lets me manually set up and transform a shape that will then be used as mask to overlay a bunch of other images for a urgent project of mine, so either replacing the image inside a SO and then export the psd as webp automatically or (in order to not reinvent the wheel) just to retrieve the necessary information and then apply them with PIL.

I also tried to just replicate a sort of smart object in Python with GUI (getting help from claude 3.5) where I managed to achieve all the modifications I needed, however having troubles with replicating the warp and also researching on it's theory and having being banned from stackoverflow for asking a question regarding the warp (absurd) I had to stop.

I will be ecstatically looking forward for the updates and I'm 150% routing for you. Did you have a timeline for the SO update? On psd-tools repo the writing of SOs is literally the n1 requested feature, although the author said is not planned. If you want moral support we can definitely connect and I'll provide for sure ahaha, unfortunately can't provide much code knowledge, you're way smarter than me.

EmilDohne commented 4 weeks ago

Hey @milqnomadu, unfortunately I am unable to give an exact timeline as from researching smart objects earlier they are not necessarily trivial to implement. But I am guessing somewhere between Q3 and Q4 2024 it should be possible :)

milqnomadu commented 4 weeks ago

Hey Emil thank you so much! Will wait anxiously for the update that will enable to replace images inside of smart objects. I'm sure you can do it even faster than the predicted time. If you need any type of help I will be very happy to help.

Have an awsome day!

EmilDohne commented 3 weeks ago

@milqnomadu to give you an update on the progress you can follow #57 as i've started working on this issue and will update the status in there :)

milqnomadu commented 3 weeks ago

@EmilDohne thank you Emil. I've sent you an email a couple of days ago, don't know if you saw it though.

EmilDohne commented 3 weeks ago

Hey @milqnomadu I responded now it managed to land in my spam, thanks a lot!