Ticket #544 (closed story: fixed)

Opened 13 years ago

Last modified 13 years ago

Sent images are scaled to proper sizes

Reported by: tarmo Owned by: tarmo
Priority: blocker Milestone: 0.7 Búri
Component: generic Version:
Keywords: Cc:
Time planned: 2h Time remaining:
Time spent:

Description (last modified by hans) (diff)

Whenever an image is sent to LeMill, it is scaled to proper sizes. Scaling must always preserve the aspect ratio of the image.

  • Cover images are scaled to 160x120 (adding black borders to sides or top and bottom, as needed), and the high resolution version is stored so we can change this later
    • An icon depicting the type of the resource is added on top of the scaled image
  • For other images, the high resolution version is stored, and these smaller sizes are generated:
    • 500px maximum width/height,
    • cover image size

Change History

comment:1 Changed 13 years ago by hans

I think that we must specify here only the width. Otherwise we will change aspect ratio for photos that are done with SLR cameras (aspect ratio in SLR cameras is 3:2, point-and-shoot cameras have usually 4:3).

I propose the following rules about cover images:

  1. Cover images are scaled to 160px in width if height is not more than 75% of the width
  2. Cover images are scaled to 120px in height If height is more than 75% of the width
  3. The result of (1) or (2) is stored as a copy (this way we can for example change the icon in the future)
  4. Additional white pixels are added equally to top-bottom or left-right to get the 160x120px size
  5. Icon is added to the result of (4)

I propose the following rules about images:

For other images, the high resolution version is stored, and these smaller sizes are generated:

  • 500px longer size (it can be width or height depending on the image)
  • Cover image size

comment:2 Changed 13 years ago by tarmo

  • Owner changed from anonymous to tarmo
  • Priority changed from critical to blocker
  • Status changed from new to assigned
  • Description modified (diff)
  • Milestone set to 0.7

Updated description based on comments.

comment:3 Changed 13 years ago by hans

  • Description modified (diff)

I am starting to think that empty space should be black, not white. Then it is easier to create cover images for stories (#434). I changed the description.

comment:4 Changed 13 years ago by jukka

  • Time planned set to 2h

comment:5 Changed 13 years ago by tarmo

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.