Create Random Pixel Images in Swift
问题 I want to create a random pixel generator in swift. How would I be able to create something like the below codes in swift? Java program to demonstrate creation of random pixel image import java.io.File; import java.io.IOException; import java.awt.image.BufferedImage; import javax.imageio.ImageIO; public class RandomImage { public static void main(String args[])throws IOException { // Image file dimensions int width = 640, height = 320; // Create buffered image object BufferedImage img = null;