twig / dcxdll

Dialog Control eXtensions for mIRC
BSD 3-Clause "New" or "Revised" License
23 stars 2 forks source link

Image - noticeable flickering of frames when using animated images #68

Closed EpicNet closed 2 years ago

EpicNet commented 2 years ago

I am using "mIRC v7.67" + "DCX dll v3.1-git469" in system "Windows 8.1 x64".

When viewing an animated image, constant flickering of frames is very noticeable. There is a workaround where, if add style transparent then this helps fix the problem, but then the background color of the control will be disabled. But in fact, this should not be solved with transparency, because the background color of the control should remain the same, in case, when the aspect ratio is enabled +k the size of the image may differ from the size of the control.

Would like to see a fix for this problem. Thanks.


Here is a test piece of script to reproduce this the problem. To run the script click on "F5" or enter the command "/image_test":

alias F5 { image_test }
alias image_test {
  if ($dialog(image_test)) .dialog -x image_test | else { .dialog -m image_test image_test }
}
dialog image_test {
  title "Image test"
  icon $mircexe,0
  option pixels
  size -1 -1 450 300
}
on *:DIALOG:image_test:init:0:{
  .dcx Mark $dname image_test_work
  .xdialog -b $dname +ty
  .xdialog -g $dname +b $rgb(20,20,27)
  .xdialog -c $dname 1 image 30 25 390 250 notheme 
  .xdid -x $dname 1 +b
  .xdid -S $dname 1 1
  .xdid -C $dname 1 +b $rgb(40,40,47)
  var %image_path image\gif\file1.gif
  if ($exists(%image_path)) .xdid -i $dname 1 +abh %image_path
}
alias image_test_work {}
OokEek commented 2 years ago

This seems to be caused by the background being drawn on each frame, working on a fix.

OokEek commented 2 years ago

Fixed.