c# - Whats the most efficient method for transitioning between two images (Like Mac wallpaper change) -


I am working on a wallpaper app, the wallpapers are changed every few minutes specified by the user.

The feature I want to remove is to erase a new image while fading out the old image. The person with MAC can see the behavior that I want to change if they change their X-X minutes.

How would I consider this my current idea is to take both images and keep one on top and change ambiguity. Start the old image at 90% and the new image at 10%. Then I will reduce the old image up to 10% until it is 0%, while the new image should be increased by 10% to 90%. Then I'll set the wallpaper on the new image.

To show it as a smooth transition, instead of doing it in real time, I will make the transition wallpaper before starting the process.

My question is, is there any other effective way to do this?

I can think of some adaptation such as saving low quality transition images.

Any thoughts on those approaches that I will make as much efficient as described?

Looks like the trade off issue.

It depends on the emphasis:

  • speed of rendering
  • use of resources

rendering Speed ​​is going to be a problem that the blending process takes a lot of time (as the transparency effect is in comparison to opaque drawing processes on regular basis) to render on a screen-dojal image for how long the process of blending images is going. Can take more time), then sank Mixture pre-presentation can be a good way.

Of course, pre-rendering means there will be multiple images in memory or disk storage which should be organized on. This will mean more resources will be required for temporary storage of transition effects. If the resources are rare, transitioning on the fly may be more desirable. Additionally, if the image is on disk, then there is going to be a performance hit due to the slow I / O speed of data outside the main memory.

"With low quality to the point of saving transition images" - What does "low quality" mean? Do you want to compress the image? Or, do you mean to be a small image?

  • Compress the image

    • Pros: per image, to be consumed The amount of memory will be reduced. This will require less disk space, or space on the disk.
    • Cons: The image is taking revocation processing. Before dragging on the screen, the unstained image is taking extra space in the memory. If lossy compression like JPEGs is used, then compression can be visible to artifacts.
  • Use a small image

    • Professionals: Again, the per image, the amount of memory used will be reduced.
    • Opposition: The screen size will take some processing power by dragging the image, then additional memory will be required to create an expanded image. Finally, there is a point to consider - Actual transition in transit will not be sufficiently adequate from time to time. ?

      It may actually be closed that the rendering does not take much longer, and it can all be possible.

      > It can be worth a shot to create a prototype without any adaptation, and to see that it will be necessary to actually pre-transition the infection. To see each stage of the process, what is the time.

      If the dissatisfaction of flight performance is unsatisfactory, weigh the positive and negative of each approach of pre-rendering, and work best.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -