We present a measurement of the transverse intensity distributions of the COSY proton beam at the target interaction point at ANKE at the injection energy of 45 MeV, and after acceleration at 2.65 GeV. At 2.65 GeV, the machine acceptance was determined as well. From the intensity distributions the beam size is determined, and together with the measured machine acceptance, the dimensions of a storage cell for the double-polarized experiments with the polarized internal gas target at the ANKE spectrometer are specified. An optimum storage cell for the ANKE experiments should have dimensions of 15mm x 20mm x 390mm (vertical x horizontal x longitudinal), whereby a luminosity of about 2.5*10^29 cm^-2*s^-1 with beams of 10^10 particles stored in COSY could be reached.