Skip to content

Commit

Permalink
also accept PNG.
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Aug 20, 2010
1 parent 2531cd2 commit 576c09f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def render_to_surface(surface, scale, paper, info, font)
context.move_to(margin, paper.height - layout.pixel_size[1] - margin)
context.show_pango_layout(layout)

profile_image_url = info[:profile_image_url].gsub(/_normal\.([a-z]+)\z/, '.\1')
profile_image_url = info[:profile_image_url].gsub(/_normal\.([a-zA-Z]+)\z/,
'.\1')
extension = $1
image_data = cache_file("images", "#{screen_name}.#{extension}") do
open(profile_image_url, "rb") do |image_file|
Expand Down

0 comments on commit 576c09f

Please sign in to comment.