You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was having trouble, so reduced my code down to just what that page shows but at the resolutions I want (plus stuff to actually run). It seems the part where it says "We do not set the number of dots in the DMD here, as that's automatically pulled in from the dmd display setting." is not working. If I don't define the number of dots then it does 128 wide and whatever tall fits in the window. Adding in dots_x and dots_y in the color_dmd slide with the appropriate values and everything works.
So, bug in the code maybe? something changed where it doesn't work anymore?
my test config.yaml below, using latest dev (mpf 0.57.0.dev32, mpf-mc 0.57.0dev12). note this does have the dots_x and dots_y in it so sizes correctly, just comment those out to see what it does incorrectly.
the next part of the issue is scaling. it is interpolating incorrectly when scaling up to fit the window size based on a DMD size image, in my case a 192x64 image, getting scaled to 1920x640 gives this:
instead of the correctly 'nearest' scaling method that gives this:
I did find that if I add self.texture.mag_filter = 'nearest' to the def _on_texture_change section of image.py it does give me the desired effect for images.
But ideally it would be something we could set in our config files, but that is way beyond me. it also needs to take effect for text as well as images. I have looked briefly in text.py but have not figured out a solution for that one yet. here is the widget with scaled text that shows the blurring of the pixel font that results from the default (linear) scaling interpolation.
Here is the beginning part of the def _on_texture_change section of image.py to show where I put it.
def _on_texture_change(self, *args) -> None:
"""Update texture from image asset (callback when image texture changes)."""
del args
self.texture = self._image.image.texture
self.texture.mag_filter = 'nearest'
self.size = self.texture.size
self._draw_widget()`
Maybe there is already a way to add the texture.mag_filter in the yaml files, but I'm not finding it.
The text was updated successfully, but these errors were encountered:
I'm setting up a lcd screen to have the DMD look at 192x64 size, following the instructions on this page https://missionpinball.org/mc/displays/adding_dot_look_to_lcd/
I was having trouble, so reduced my code down to just what that page shows but at the resolutions I want (plus stuff to actually run). It seems the part where it says "We do not set the number of dots in the DMD here, as that's automatically pulled in from the dmd display setting." is not working. If I don't define the number of dots then it does 128 wide and whatever tall fits in the window. Adding in dots_x and dots_y in the color_dmd slide with the appropriate values and everything works.
So, bug in the code maybe? something changed where it doesn't work anymore?
my test config.yaml below, using latest dev (mpf 0.57.0.dev32, mpf-mc 0.57.0dev12). note this does have the dots_x and dots_y in it so sizes correctly, just comment those out to see what it does incorrectly.
the next part of the issue is scaling. it is interpolating incorrectly when scaling up to fit the window size based on a DMD size image, in my case a 192x64 image, getting scaled to 1920x640 gives this:
instead of the correctly 'nearest' scaling method that gives this:
I did find that if I add self.texture.mag_filter = 'nearest' to the def _on_texture_change section of image.py it does give me the desired effect for images.
But ideally it would be something we could set in our config files, but that is way beyond me. it also needs to take effect for text as well as images. I have looked briefly in text.py but have not figured out a solution for that one yet. here is the widget with scaled text that shows the blurring of the pixel font that results from the default (linear) scaling interpolation.
Here is the beginning part of the def _on_texture_change section of image.py to show where I put it.
Maybe there is already a way to add the texture.mag_filter in the yaml files, but I'm not finding it.
The text was updated successfully, but these errors were encountered: