Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

image resizing

 [1/5] from: sags::apollo::lv at: 8-Jun-2006 0:20


Hi! Is it possible to do image resizing for browser output without saving it to file? Example script: print "Content-Type: image/png^/" jpg: read/binary %/C/WWW/ROOT/rebol/IMG_4364.JPG t1: load jpg newsize: t1/size / 4 outl: layout [ size newsize backdrop t1 ] ; how to get rid of saving to file? out-image: to-image outl save/png %out-image.png out-image png: read/binary %out-image.png write-io system/ports/output png length? png brgds Janeks

 [2/5] from: volker::nitsch::gmail::com at: 8-Jun-2006 0:27


On 6/7/06, sags-apollo.lv <sags-apollo.lv> wrote:
> Hi! > Is it possible to do image resizing for browser output without
<<quoted lines omitted: 13>>
> png: read/binary %out-image.png > write-io system/ports/output png length? png
You can save to binaries.
>> save/png bin: #{} to-image layout[size 5x5] >> length? bin
== 103
>> ? bin
BIN is a binary of value: #{ 89504E470D0A1A0A0000000D4948445200000005000000050802000000020DB1 B20000001374455874536F667477617265005245424F4C2F566965778FD91678 0000000F49444154789C6338810A1828E4030028973A99450E58C10000000049 454E44AE426082 }
> brgds > Janeks > -- > To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject. >
-- -Volker Any problem in computer science can be solved with another layer of indirection. But that usually will create another problem. David Wheeler

 [3/5] from: sags:apollo:lv at: 8-Jun-2006 7:49


Thanks, Volker! I already noted in some examples and scripts this notation: command/function variable: value I never used it so it is a bit confusing for me. Are there any a little bit detailed information about this way? When it can/should be used what kind of functions can do that? Thanks in advance! Janeks On 8 Jun 2006 at 0:27, Volker Nitsch wrote:

 [4/5] from: volker:nitsch:g:mail at: 8-Jun-2006 10:21


On 6/8/06, sags-apollo.lv <sags-apollo.lv> wrote:
> Thanks, Volker! > > I already noted in some examples and scripts this notation: > > command/function variable: value > > I never used it so it is a bit confusing for me. > Are there any a little bit detailed information about this way? > When it can/should be used what kind of functions can do that? >
its a shortcut. save/png bin: #{} to-image layout[size 5x5] is the same as bin: #{} save/png #{} to-image layout[size 5x5] You can do assignments in expressions,
>> sum: 1 + prod: 2 * 3
== 7
>> sum
== 7
>> prod
== 6 and i sometimes use that. (btw it should be "copy #{}", forgot the copy)
> Thanks in advance! > Janeks
<<quoted lines omitted: 67>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- -Volker Any problem in computer science can be solved with another layer of indirection. But that usually will create another problem. David Wheeler

 [5/5] from: volker::nitsch::gmail::com at: 8-Jun-2006 10:25


On 6/8/06, Volker Nitsch <volker.nitsch-gmail.com> wrote:
> On 6/8/06, sags-apollo.lv <sags-apollo.lv> wrote: > >
<<quoted lines omitted: 13>>
> bin: #{} > save/png #{} to-image layout[size 5x5]
Typo.. Should be save/png bin to-image layout[size 5x5] and never forget the copy, so bin: copy #{} save/png bin to-image layout[size 5x5] [snip] -- -Volker Any problem in computer science can be solved with another layer of indirection. But that usually will create another problem. David Wheeler

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted