Removed separate y variable when reading/writing jpegs.