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

How to assign the name of the input image to the output image? #15

Open
Danee-wawawa opened this issue Oct 17, 2023 · 2 comments
Open
Assignees
Labels
question Further information is requested

Comments

@Danee-wawawa
Copy link

Hi, thank you for your work. When generating an image, I want it to keep the name of the source image, rather than renaming it to a name like 'sample_1' through the following code.
452ed663df32b17a7d8d1e3fd7a9d58

@usert5432 usert5432 self-assigned this Oct 18, 2023
@usert5432
Copy link
Collaborator

Hi @Danee-wawawa,

Unfortunately, we did not implement such a functionality. If one requires to preserve the file names, one can implement a post-processing step and rename the sample_{index}.{ext} images back into the original file names.

This process is relatively straightforward since {index} corresponds to the position of the original file name when they are sorted in lexicographical order. For example, if the original file names are:

  • apple.jpg
  • cherry.jpg
  • banana.jpg

they will be assigned the following indices (based on their sorted order)

  • apple.jpg (index 0)
  • banana.jpg (index 1)
  • cherry.jpg (index 2)

@usert5432 usert5432 added the question Further information is requested label Oct 18, 2023
@Danee-wawawa
Copy link
Author

OK, I will try it, thank you~

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

No branches or pull requests

2 participants