a method and system are provided for encoding a picture . the method includes encoding the picture into a first encoded picture using a first universal quantizer . if a size of the first encoded picture is greater than a maximum picture size , the method includes encoding the picture into a second encoded picture using small quantizers for smooth regions of the picture and large quantizers for complex regions . if a size of the second encoded picture is still greater than a maximum picture size , the method includes encoding the picture into a third encoded picture with revised quantizers for complex regions and dropping high frequency coefficients if necessary to ensure the encoded picture size never exceeds the maximum size .