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

PNG Images Not Showing Up #17

Open
ThePieMonster opened this issue Aug 6, 2022 · 7 comments
Open

PNG Images Not Showing Up #17

ThePieMonster opened this issue Aug 6, 2022 · 7 comments

Comments

@ThePieMonster
Copy link

It seems only JPG images are showing up. Why are PNG images not allowed?

@joedockrill
Copy link
Owner

ImgType defaults to Photo to filter out clipart and GIFs, it's probably responsible. Try setting it to All instead

@ThePieMonster
Copy link
Author

What do you mean try setting it to "all" @joedockrill ?

Current code is below:

display_image_cleaner(root_path)

@joedockrill
Copy link
Owner

joedockrill commented Aug 7, 2022

When you run the search, not when you display the results.

duckduckgo_search(root_path, "Nice", "nice clowns", img_type=ImgType.All)

It defaults that way because this was written for creating deep learning datasets and I didn't want clipart and GIFs. If you're doing something else then you may want to run the search differently.

It'll return whatever the search does. If you particularly want PNGs you can try ImgType.Transparent and see if those results suit your needs better.

Read the docs. https://joedockrill.github.io/jmd_imagescraper/core.html

@ThePieMonster
Copy link
Author

@joedockrill I already have PNGs in the folder. What I am saying is that PNGs do not show up in the image viewer, only JPGs. You can see in Colabs file browser that there are PNGs in the folder but are not being displayed by display_image_cleaner(root_path).

@joedockrill
Copy link
Owner

Oh yeah, that's my fault, but I don't have a PC/laptop at the moment to be able to rebuild the library.

Are you on the fastai forums? If you can find someone who knows nbdev and is prepared to fix it then it's a trivial change to one function, but otherwise I'm afraid it'll stay broken for now.

@joedockrill joedockrill reopened this Aug 7, 2022
@joedockrill
Copy link
Owner

icln_render_batch needs fixing at line 137, extend files array with *.png, *.gif etc

@ThePieMonster
Copy link
Author

@joedockrill

icln_render_batch needs fixing at line 137, extend files array with *.png, *.gif etc

Thank you for re-opening. I am not familiar with those forums but can wait for someone to provide a fix / new build.

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