Rank: Advanced Member
Groups: Guest
Joined: 6/9/2016(UTC) Posts: 34
Thanks: 22 times
|
Are there any settings that affect rendering performance of calling DrawImage()? Currently rendering paths are quick but drawing images are fairly slow (150-300 millisecond range depending on size). I ask about settings due to seeing the link below about GDI+ DrawImage performance and was wondering whether there are equivalent or relevant settings that affect GraphicsMill. Even if it reduces the quality. http://stackoverflow.com/questions/11020710/is-graphics-drawimage-too-slow-for-bigger-images Other than settings, is there anything else i can do to improve performance of this? One thing i will try is to convert the image to match the same pixel format (RGB to cmyka). Should this help? Thanks
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 9/19/2006(UTC) Posts: 505
Was thanked: 41 time(s) in 41 post(s)
|
Hi Chris, We will check the performance of DrawImage method by the next major release. Unfortunately, there are no settings you could use for performance tuning. If you draw a bitmap on a bitmap and there are no clipping paths and transforms, you can try to use Bitmap.Draw method. Both pixel formats must be the same. |
Best regards, Eugene Kosmin The Aurigma Development Team
|
1 user thanked Eugene Kosmin for this useful post.
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 6/9/2016(UTC) Posts: 34
Thanks: 22 times
|
Just an update: Drawing a 5000x3333 pixel image cropped to a few hundred pixel area was taking 300-400 milliseconds and applying a scaling transform to stretch it to fit made it take 10x longer at 3350 milliseconds! I've found a better approach which is to take a copy of the large bitmap, resize it using the low quality option to make it match the exact target bitmap size and just draw it on the target bitmap with no transform. It is now down to the 100-200 millisecond range. There are probably a few more optimisations that i can make as well such as caching off the resized intermediate bitmap and possibly doing all rendering on a separate thread to keep the UI smooth.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.