imagegif function has no 'quality' argument, imagepng's quality argument is the compression level from 0 (no compression) to 9