Hi There,
You could use PsychoPy coder to create a large number of images without loosing resolution. Since this is a common issue on the forum at the moment I made a demo that you can download here https://gitlab.pavlovia.org/lpxrh6/makegratingstimuli
Hope this is helpful,
Becca