Displaying 6 results from an estimated 6 matches for "image_width".
2006 Jul 25
1
How do I validate using associated objects?
...belongs_to :board
has_many :uploads
end
class Upload < ActiveRecord::Base
belongs_to :comment
end
class Image < Upload
before_create :create_image
before_create :create_thumbnail
def create_image
@image = Magick::ImageList.new.from_blob(@upload_blob)
self[:image_width] = @image.columns
self[:image_height] = @image.rows
end
def create_thumbnail
@thumbnail = Magick::ImageList.new.from_blob(@image[0].to_blob)
if comment.parent_id == nil
x = comment.board.setting(:parent_thumbnail_at_width)
y = comment.board.setting(:parent_thumbnail_...
2006 Jan 11
0
Limit attributes written out by to_yaml
...#39;
display_format: Vertical
minimum_number_responses:
item_sub_text: ''''
page_number: 5
row_text_width:
email_address_yn: N
survey_id: 153
other_yn: N
random_answer_order_yn: N
database_dsn: ''''
image_width: ''''
other_display_type:
subitem_count:
answer_total:
item_text: "<span style=\"font-weight:bold\">When a good has
positive network externalities,
this means that when using the product:</span>"
order_number: 26...
2007 Mar 02
0
12 commits - libswfdec/Makefile.am libswfdec/swfdec_audio_flv.c libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_js.c libswfdec/swfdec_js.h libswfdec/swfdec_js_video.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h
...fdec_video_movie.c
@@ -46,7 +46,9 @@ swfdec_video_movie_render (SwfdecMovie *
if (movie->image == NULL)
return;
- cairo_scale (cr, SWFDEC_TWIPS_SCALE_FACTOR, SWFDEC_TWIPS_SCALE_FACTOR);
+ cairo_scale (cr,
+ (mov->original_extents.x1 - mov->original_extents.x0) / movie->image_width,
+ (mov->original_extents.y1 - mov->original_extents.y0) / movie->image_height);
cairo_set_source_surface (cr, movie->image, 0.0, 0.0);
cairo_paint (cr);
}
@@ -140,15 +142,20 @@ swfdec_video_movie_clear (SwfdecVideoMov
}
void
-swfdec_video_movie_new_image (SwfdecVideoMov...
2005 Jan 09
19
Shorewall and CUPS printing interference
...12:05:40 -0500] [Job 9] GIMP-PRINT tossing right 0
I [28/Dec/2004:12:05:40 -0500] [Job 9] Finished page 1...
d [28/Dec/2004:12:05:40 -0500] PID 7522 exited with no errors.
D [28/Dec/2004:12:05:40 -0500] [Job 9] GIMP-PRINT: Image_height 3915
D [28/Dec/2004:12:05:40 -0500] [Job 9] GIMP-PRINT: Image_width 3060
D [28/Dec/2004:12:05:40 -0500] [Job 9] GIMP-PRINT: Image_width 3060
D [28/Dec/2004:12:05:40 -0500] [Job 9] GIMP-PRINT: Image_height 3915
D [28/Dec/2004:12:05:40 -0500] [Job 9] GIMP-PRINT: Image_height 3915
D [28/Dec/2004:12:05:40 -0500] [Job 9] GIMP-PRINT: Image_width 3060
I [28/Dec/...
2007 Apr 06
0
3 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_codec.c libswfdec/swfdec_codec_ffmpeg.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_codec_video.c
...if_fail (SWFDEC_IS_VIDEO_MOVIE (movie));
g_return_if_fail (image != NULL);
- g_return_if_fail (width > 0);
- g_return_if_fail (height > 0);
if (movie->image)
cairo_surface_destroy (movie->image);
cairo_surface_reference (image);
movie->image = image;
- movie->image_width = width;
- movie->image_height = height;
+ movie->image_width = cairo_image_surface_get_width (image);
+ movie->image_height = cairo_image_surface_get_height (image);
swfdec_movie_invalidate (SWFDEC_MOVIE (movie));
}
diff --git a/libswfdec/swfdec_video_movie.h b/libswfdec/swfdec_v...
2007 Oct 18
0
18 commits - doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_flash_security.c
...cColorTransform *trans, const SwfdecRect *inval)
{
SwfdecVideoMovie *movie = SWFDEC_VIDEO_MOVIE (mov);
+ swfdec_video_movie_update_image (movie);
if (movie->image == NULL)
return;
cairo_scale (cr,
- (mov->original_extents.x1 - mov->original_extents.x0) / movie->image_width,
- (mov->original_extents.y1 - mov->original_extents.y0) / movie->image_height);
+ (mov->original_extents.x1 - mov->original_extents.x0)
+ / cairo_image_surface_get_width (movie->image),
+ (mov->original_extents.y1 - mov->original_extents.y0)
+ / cai...