Opened 13 years ago

Closed 13 years ago

#3706 closed patch (fixed)

[PATCH] mytharchive does not preserve aspect ratio of images

Reported by: Steve VanDeBogart <vandebo-mythtvtrac@…> Owned by: paulh
Priority: minor Milestone: unknown
Component: mytharchive Version: 0.20
Severity: low Keywords: image aspect ratio stretch
Cc: Ticket locked: no

Description

Some themes assume specific sizes/aspect ratios for images, i.e. a thumbnail from a show in 4:3 but when archiving videos with cover art, the aspect ratio is usually not 4:3 and the image is stretched and deformed. The attached patch changes the default behavoir of the graphic tag/attribute in mytharchive themes to preserve image aspect ratio with an optional attribute 'stretch="False"' to invoke the old behavoir.

Attachments (2)

aspect.patch (19.5 KB) - added by Steve VanDeBogart <vandebo-mythtvtrac@…> 13 years ago.
aspect-20070731.patch (22.6 KB) - added by Steve VanDeBogart <vandebo-mythtvtrac@…> 13 years ago.

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by Steve VanDeBogart <vandebo-mythtvtrac@…>

Attachment: aspect.patch added

comment:1 Changed 13 years ago by stuartm

Severity: highlow
Type: defectpatch

comment:2 Changed 13 years ago by paulh

Steve

Can you please update the patch to work with current svn it no longer applies cleanly after the animated images stuff was added, thanks.

Also I don't think its safe to assume that the screen grab images are the correct aspect ratio since they are captured at the native video resolution. Ideally the screen grab images would be scaled to the correct dimensions based on what the video resolution is (4:3 or 16:9 usually) and any cover art images from MythVideo? would be used as is.

comment:3 Changed 13 years ago by Steve VanDeBogart <vandebo-mythtvtrac@…>

I've cleaned up this patch and applied it against svn head.

It does seem that thumbnails generated by mytharchivehelper are at the native video resolution. I could add python code to scale those as they come in, but it seems that the "right way" to fix it is to change mytharchivehelper to examine the aspect ratio of the video as it extracts the image and scale it on the spot. Especially since it's possible (I think) for a video stream (specifically VOB) to have different aspect ratio's for different sections of video. Let me know what you think the best way to fix this is and I'll work on it.

Changed 13 years ago by Steve VanDeBogart <vandebo-mythtvtrac@…>

Attachment: aspect-20070731.patch added

comment:4 Changed 13 years ago by paulh

Resolution: fixed
Status: newclosed

(In [14151]) Some DVD theme enhancements.

  • All theme items can now have a background which can be alpha blended onto the DVD menu.
  • The text within text boxes can now be vertically aligned to the top, center, or bottom and can also be indented from the left and/or top edges.
  • The 'Previous', 'Next', 'Play All', 'Main Menu', title item and chapter item buttons are all now defined in the same way and can contain images, text or both.
  • Adds a 'Play All' button to the G.A.N.T. theme. Closes #3761.
  • It's now possible to add images to a theme and have there aspect ratio preserved. The default behaviour is to always scale images to fit the space available except for MythVideo? cover art images. Some new attributes can override the default behaviour.

stretch="True|False" - if False the image will be scaled to best

fit the space available preserving the aspect ratio. The attributes below can be used to position the image within the available space.

halign="Left|Center|Right" - control the horizontal placement valign="Top|Center|Bottom" - control the vertical placement

Fixes #3706.

  • Revamps the G.A.N.T theme to use many of the new theme features.
Note: See TracTickets for help on using tickets.