Displaying 1 result from an estimated 1 matches for "type_int_rgb".
2008 Apr 15
4
trouble streaming images with send_data
...browser just shows the URL in
the window as a very small image (about .4 kb) when I am using jpeg
format. For png, it tells me that the image has errors and can''t load
it.
Here''s what I''m doing in the controller:
def sendImage
biFiltered = BI.new(100, 100, BI::TYPE_INT_RGB)
big = biFiltered.createGraphics()
$w = 0
$h = 0
begin
filename = "#{RAILS_ROOT}/public/images/kids.jpg"
imagefile = java.io.File.new(filename)
bi = javax.imageio.ImageIO.read(imagefile)
w = bi.getWidth(nil);
h = bi.g...