Closed Bug 903348 Opened 7 years ago Closed 7 years ago

[Gallery] HD Video play icon is blurry

Categories

(Firefox OS Graveyard :: Gaia::Gallery, defect, P1)

All
Other
defect

Tracking

(blocking-b2g:hd+, b2g-v1.1hd fixed)

VERIFIED FIXED
blocking-b2g hd+
Tracking Status
b2g-v1.1hd --- fixed

People

(Reporter: epang, Assigned: gduan)

Details

(Whiteboard: helix vsd, HD)

Attachments

(6 files)

The circular play icon used for videos are blurry.  They seem to be resized from the larger version.  

There are two sizes, one found in the gallery and the other appears in the camera app at the top after you take a video.  Is there a way we can make these sharper, if needed we can provide resized graphics if you let us know the sizes needed.

Thanks!
Attached image Camera - Play Icon.png
I need help from David.

Hey David can you give me a joker when can I find the image and can I change it?
Flags: needinfo?(dflanagan)
They're not images. The play icon and circle are drawn directly into the thumbnail images using canvas drawing commands.

See apps/gallery/js/MetadataParser.js:85 and apps/camera/js/filmstrip.js:466

In both cases all of the drawing commands are done relative to the thumbnail size, so the circle and arrow grow with the thumbnail.  Gallery enlarges its thumbnails based on devicePixelRatio, so the icons should be good there. You might need to delete your database or do make reset-gaia or reflash with a nightly in order to rescan your photos and get the latest code.  If rescanning everything in gallery doesn't fix the icons, then I don't know what is going wrong.

In filmstrip.js, the thumbnails are being created at 46px by 46px, and this is not adjusted for HD displays.  So you might need to make a change there that is analogous to what is done in gallery.

Take a look at what George did in bug 899526.  Since this is a JS bug and not a CSS bug, you can probably reasssign it to George if you need to.
Flags: needinfo?(dflanagan)
adding status-b2g-v1.1hd:? flag
hd+ asset
blocking-b2g: hd? → hd+
(In reply to David Flanagan [:djf] from comment #3)
> They're not images. The play icon and circle are drawn directly into the
> thumbnail images using canvas drawing commands.
> 
> See apps/gallery/js/MetadataParser.js:85 and apps/camera/js/filmstrip.js:466
> 
> In both cases all of the drawing commands are done relative to the thumbnail
> size, so the circle and arrow grow with the thumbnail.  Gallery enlarges its
> thumbnails based on devicePixelRatio, so the icons should be good there. You
> might need to delete your database or do make reset-gaia or reflash with a
> nightly in order to rescan your photos and get the latest code.  If
> rescanning everything in gallery doesn't fix the icons, then I don't know
> what is going wrong.
> 
> In filmstrip.js, the thumbnails are being created at 46px by 46px, and this
> is not adjusted for HD displays.  So you might need to make a change there
> that is analogous to what is done in gallery.
> 
> Take a look at what George did in bug 899526.  Since this is a JS bug and
> not a CSS bug, you can probably reasssign it to George if you need to.

Thanks David!  Pavel, can you take a look?  Please reassigned or ask George for help if needed. Thanks!
Assignee: pivanov → gduan
Attached file PR to master
Add devicePixelRatio for camera filmstrip
Attachment #792127 - Flags: review?(dflanagan)
Attached image (camera)After change
Sorry for late update.
(In reply to George Duan [:gduan] from comment #9)
> Created attachment 792129 [details]
> (camera)After change
> 
> Sorry for late update.

This looks much better George.  Thanks for your work on this!  Does the patch also fix the video icons in the gallery?
In reply to comment 10,

please see bug 899526, it should fix this bug. I've attached images in that.
(In reply to George Duan [:gduan] from comment #11)
> In reply to comment 10,
> 
> please see bug 899526, it should fix this bug. I've attached images in that.

great, thanks!
Whiteboard: helix vsd → helix vsd, HD
Comment on attachment 792127 [details]
PR to master

Trivial patch; obviously correct.

Nit: I wouldn't have bothered defining a constant and would just treat window.devicePixelRatio as the constant.  But it is fine as is.
Attachment #792127 - Flags: review?(dflanagan) → review+
Landed this to master: https://github.com/mozilla-b2g/gaia/commit/e335216618c8eb8676e4d9f815cb94dcd721e542

Still needs uplift to the hd branch, though
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
(In reply to David Flanagan [:djf] from comment #14)
> Landed this to master:
> https://github.com/mozilla-b2g/gaia/commit/
> e335216618c8eb8676e4d9f815cb94dcd721e542
> 
> Still needs uplift to the hd branch, though

Thanks David!  George, can you uplift to hd branch? thanks!
Flags: needinfo?(gduan)
(In reply to George Duan [:gduan] from comment #16)
> V1.1.0hd:
> https://github.com/mozilla-b2g/gaia/commit/
> e3a6815b10080f9e257640cd068bf8efd86e04c7

Thanks!
(In reply to George Duan [:gduan] from comment #16)
> V1.1.0hd:
> https://github.com/mozilla-b2g/gaia/commit/
> e3a6815b10080f9e257640cd068bf8efd86e04c7

Thanks! One more thing, can you change the status-b2g-v1.1hd:? to fixed?
Appreciating your help. Verified this patch.

* Test build:(Mozilla Central-helix/2013-08-25-04-22-01)
  + Mercurial-Information
    - Gecko revision="f392714dea0b"
  + Git-information
    - Gaia revision="7b61b7dc3400d5bea23d2b52948f4fded8259dfc"


Attaching the screenshot. Marked as verified.
Status: RESOLVED → VERIFIED
Attached image Video play icon
You need to log in before you can comment on or make changes to this bug.