Digital graphics can be either raster or vector graphics. Raster graphics use bitmaps made of pixels to represent images, while vector graphics use paths defined by points and curves. Common raster formats include JPEG, TIFF, GIF and BMP, which are used for photos, publishing, web animations, and uncompressed images respectively. Vector formats include AI, PSD, and WMF, used for logos, image editing, and scalable graphics. Images can be captured with scanners, cameras, and tablets, then optimized for web by reducing size, depth, and resolution and compressing files.