In this paper, we consider a task of providing a desired compression ratio (CR) in lossy compression of color images by better portable graphics (BPG) encoder. The problem consists in the fact that this encoder, on the one hand, produces certain benefits compared to other modern image compression techniques in the sense of better quality for the same CR, but, on the other hand, CR for a fixed value of a parameter that controls compression (PCC) in BPG can vary in very vast limits depending on image content. Since a recently proposed two-step method of providing a desired quality of compressed images based on average rate-distortion curves has recently demonstrated its high efficiency and accuracy acceptable for many practical applications, we analyze the applicability of this approach to providing a desired CR. It is shown that the accuracy of providing a desired CR characterized by variance for a set of test images improves radically after the second step compared to the first step parameters, which are determined by the average dependence of CR on Q. Variances of original (after the first step) and provided (after the second step) also depend on a desired CR and they are larger for the larger desired CR. The influence of residual errors in the provided CR on image quality is studied as well.