In the current methods of ROI coding methods, after all the pixels have been scanned in order and the ROI is distinguished, an ROI mask is generated. So, to support a dynamic Region-of-Interest (ROI) in JPEG2000, fast ROI mask generation is needed. Our method scans 4 pixels of the corners in one code block and then, based on the information, scans the edges from the corners to get the boundaries of the ROI and background. This information consists of distributed information about the ROI and two coordinates of the pixels, which are the points where the edges and boundaries meet. This information is transmitted to the encoder and supported for fast ROI mask generation. There are no great differences between the proposed method and the existing methods in terms of quality, but the proposed method showed superiority in speed.