-
Hello, Question 1: Question 2: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Question 1I used your example, but in my case it didn't show a black border at the bottom. However, you can change the output format to PNG, which should fix it. configs: ProImageEditorConfigs(
imageGenerationConfigs: ImageGeneratioConfigs(
outputFormat: OutputFormat.png,
)
) Question 2Yes, you can also do it in the generation configs like below. configs: ProImageEditorConfigs(
imageGenerationConfigs: ImageGeneratioConfigs(
/// The pixel ratio of the image relative to the content.
customPixelRatio: MediaQuery.of(context).devicePixelRatio,
/// The maximum output size for the image. It will maintain
/// the image's aspect ratio but will fit within the specified
/// constraints, similar to BoxFit.contain.
maxOutputSize: const Size(2000, 2000),
), The final image size is generated from your rendered image size and the pixel ratio you insert. For example, if your image is 500px wide, and you set the pixel ratio to 1, the resulting width will be 500px, and if you set the pixel ratio to 4, it will be 2000px. In the example above I use the devicePixelRatio, but feel free to use any value you want. But keep in mind that the larger the output size, the longer it will take to generate. If you want to generate the final image in a few milliseconds as a thumbnail and the high-resolution image in the background, I recommend you to check out this example where you enable the “Generate Thumbnail” option. |
Beta Was this translation helpful? Give feedback.
-
It's work~ THANK YOU! |
Beta Was this translation helpful? Give feedback.
Question 1
I used your example, but in my case it didn't show a black border at the bottom. However, you can change the output format to PNG, which should fix it.
Question 2
Yes, you can also do it in the generation configs like below.