Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After reading with lsb, the image is closed #51

Closed
Starmania opened this issue Sep 6, 2024 · 4 comments
Closed

After reading with lsb, the image is closed #51

Starmania opened this issue Sep 6, 2024 · 4 comments

Comments

@Starmania
Copy link

Hey,

I was building on top of your library when I came across some odd behavior. After reading an image, it would close.

Except that after reading the image's secret text, I still need to do some processing on it. Right now I'm doing some Monkey Patching, but it's not great...

Would it be possible not to close the image? Or just add a parameter to tell you not to close it?

Thanks a lot!

@cedricbonhomme
Copy link
Owner

Hi,

Are you doing some stuff with the result of Stegano ? If yes, why not opening the file on your side? Or maybe you are doing various processing before the end of the generation of the image by Stegano ? If you could explain a bit more, that would help. Thanks !

@Starmania
Copy link
Author

Starmania commented Sep 7, 2024

Hey,

Here is my code, where I'm giving to the décoder the image. https://github.com/Starmania/getscrambled/blob/e69be36e48b5430ee54477b8a9c0e1e8e36332d4/getscrambled/decode.py#L38

You could see that I still need to read the image by myself after getting the hidden data...

@cedricbonhomme
Copy link
Owner

OK, I see. Not fan, but I added a parameter, close_file. As you can see here:
https://github.com/cedricbonhomme/Stegano/blob/master/stegano/lsb/lsb.py#L70

It's already published on Pypi.

@Starmania
Copy link
Author

I can understand why you're not fan of it, but this is still better than monkey patch an object....

Thanks you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants