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

Update Pokémon Dream World sprites #505

Open
LateusBetelgeuse opened this issue Jun 29, 2020 · 6 comments
Open

Update Pokémon Dream World sprites #505

LateusBetelgeuse opened this issue Jun 29, 2020 · 6 comments

Comments

@LateusBetelgeuse
Copy link

The sprites of Pokémon Dream World in the repo are very outdated. You can find an updated database in Bulbapedia:
Pokémon Dream World
Pokémon Dream World Items

Sadly Bulbapedia does not have a Download All button, so the sprites must be downloaded one by one. For the record I do not recommend to only download the ones that you don't have, because they apparently resized all items (they are smaller and have a transparent margin), so if you mix them the layout will be quite inconsistent.

@LateusBetelgeuse LateusBetelgeuse changed the title Update Pokémon Dream Work sprites Update Pokémon Dream World sprites Jun 29, 2020
@HybridShivam
Copy link

HybridShivam commented Jun 30, 2020

This can be done with a simple python script , no need to download them all manually. Currently I am engaged with a lot of other tasks otherwise would have definitely helped. Also I created one repo where I used Python to Scrap Bulbapedia images for my PokeDex. The Repo here
The python modules used are :
requests for making http requests (also for batch downloading if you like ) and
BeautifulSoup for parsing the html and scraping the links.

@Naramsim
Copy link
Member

@lateo96, we don't have Dream World's sprites in our repo.

@LateusBetelgeuse
Copy link
Author

LateusBetelgeuse commented Jun 30, 2020

@HybridShivam thanks. I just used DownThemAll! to download all images, and I was just about to update this issue. However a lot of thanks for the python repo, I will give it a shot.

@LateusBetelgeuse
Copy link
Author

@Naramsim totally disagree. Can you explain then what this folder is for?
https://github.com/PokeAPI/pokeapi/tree/master/data/v2/sprites/items/dream-world
That folder was added 4 years ago, so it needs to be updated. Most items/pokemon from G7 backward have a Dream World sprite, including alolan forms. While Nintendo shutdown Dream World the sprites are still being designed and added by the community, and there's a reason of why they are in the repo: they just look great. I assume that you stop using them because the sprites wasn't updated in quite a long time, but they are all updated and available in Bulbapedia's archives.

@LateusBetelgeuse
Copy link
Author

LateusBetelgeuse commented Jun 30, 2020

I stated that you should download all files and not just the ones you don't have. I was wrong, the old files are still very big, so you must resize all old sprites and add a transparent margin to make them visually consistent with all the new sprites, which have a fixed size of 80x80 pixels.

For example, we have these old/new pair of sprites:
Dream_Luxury_Ball_Sprite Dream_Lure_Ball_Sprite

As you can see, while the two images have a similar size (80x80 vs 90x90), the Luxury Ball is bigger because it does not have a transparent margin. I solved this by making the following steps:

  1. Scale down the bigger image. A 64% appears to be the perfect scale factor.
  2. Add a transparent margin until reach a size of 80x80 pixels.

The first step can be accomplished with the following ImageMagick command:

$ convert ./Dream_Luxury_Ball_Sprite.png -resize 64% ./Dream_Luxury_Ball_Sprite_scaled.png

Dream_Luxury_Ball_Sprite_scaled Dream_Lure_Ball_Sprite

The second step with another ImageMagick command:

$ convert ./Dream_Luxury_Ball_Sprite_scaled.png -background none -gravity center -extent 80x80 ./Dream_Luxury_Ball_Sprite_scaled_extended.png

Dream_Luxury_Ball_Sprite_scaled_extended Dream_Lure_Ball_Sprite

Note: As pointed out here the order of the parameters given to convert is significant.

@Naramsim
Copy link
Member

Naramsim commented Jul 6, 2020

Hmm, thanks for detailing everything out. You did a good analysis. Still, we don't serve Dream World sprites through the APIs. Those files are 4 years old and I doubt we ever used them. We can get rid of them, instead, we are working on adding new sprites to the API over here: PokeAPI/sprites#12

If you are willing, @lateo96, you can contribute over there helping @C-Garza.

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

3 participants