#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    1
    Rep Power
    0

    Smile Using the "pygame.transform.scale" function in Pygame


    I've been using this function in pygame to shrink some images for a game I'm making. So far, it's been working great.

    I was just wondering if the program would run better if I just used GIMP and re-scaled all the images myself.

    So far I've had to no lag or any other issues with pygame, but I wanted to avoid some potential problems down the road as I load more images.

    Anyone on here familiar with the pygame module?

    Any thoughts would be appreciated?

    Bee-tee-dubs, most of the images are around one MB in size, and are in PNG format.
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,841
    Rep Power
    480
    I haven't yet learned to use gimp scripts/gimp in batch mode. Maybe it's easy.

    Therefor I'd use convert from imagemagick.

    I've got a picture named wheat.png . Identify it. Display it. Triple its size and display the effect. Change it and save to a new file format, jpg.
    Code:
    $ identify wheat.png
    wheat.png PNG 638x293 638x293+0+0 8-bit DirectClass 108KB 0.000u 0:00.000
    $ display wheat.png
    $ convert wheat.png -resize '300%' png: | display png:
    $ convert wheat.png -resize '300%' wheat.jpg
    The imagamagick program suite has a lot of options. Convert is great for batch processing.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo