[rebol [
comment: {
JUF (just for fun):
if iam done this right, /view can
grayscale and dump an image 500x350
in ~2.5sec (k2/350)
dump means, it extracts one color from each
pixel in a loop (*175000) (dont know which color :).
should do this
" tricky part.. Image encoding must be direct hex stream (1,2,4
or 8 bits per pixel, greyscale)"
with 8bit/pixel?
don't know if its fast enough compared to native tools,
and you need a running x-server with access for the cgi-owner
to use it.. (or windows?)
now learning pdf ..
oh yes, the code is high dirty,
yell if you need cleanup :)
Volker
}]
;---
;some helpers
;debug2/cmd source ???
???: func ['wort wert] [
print [mold :wort " : " mold wert]
wort wert
]
;---
;get image
b: load read-thru
;http://www.rebol.com/view/demos/palms.jpg
http://www.rebolforces.com/reb/images/rebolt.jpg
probe type? b
??? a: b/size
;---
;a bit show-sugar before
h: to image! layout [origin 0x0 image b effect [grayscale]]
view layout [
title "here is the used picture"
across image b image h
return
button "benchmark" [unview/all]
text "read on console.."
;box a effect[cross]
]
??? c: a/x * a/y
d: make binary! c
;---
; the benchmark (!!)
do [
t1: now/precise
;---
;the real working part.. !!!!
i: to image! layout [origin 0x0 image b effect [grayscale]]
repeat f divide length? i 4 [
insert tail d to char! i/:f/1
]
??? t2: now/time/precise - t1/time
]
probe length? d
;halt
]
>>>>>>>>>>>>>>>>>> Ursprüngliche Nachricht <<<<<<<<<<<<<<<<<<
Am 04.05.01, 08:24:18, schrieb Joanna Kurki <[EMAIL PROTECTED]> zum
Thema [REBOL] Re: Can Rebol Do?. (was) Re: International REBOL Use:
> >Atachment easy, Sterlings %attach.r in the script-library.
> >Pdf? I found nothing ready i know not much about it.
> >Some kind of postscript with some packing? grin
> In my original implementation idea I'm going to Hand-code PS (it's
yet
> another programming language, looks related to Forth) and then find
some
> Linux tool (Ghostscript package has tool named ps2pdf and it's part if
> standard Linux RH7) to convert it into PDF..
> I know it's possible to use some 3:rd part library to make PDF
directly
> within PHP but those libraries have such high licensing fees they
don't fit
> into this project. (not my fault, I did not sell this idea it to
customer,
> I would have just offered plain ascii E-mail ;-)
> >Use your pdf-tools with /Pro /Command?
> >Or php calling some rebol-scripts?
> >Call the tools for php, make the files,
> >then call a caller for %attach.r (args..)
> >(since it sounds the attaching is a project in php :)
> >
> >Hm, with postscript the email would look like
> >
> > ...lots of stuff...
> > {line 1 of email} show-somehow
> > {line 2 of email} show-somehow
> > ...
> > size-of-pic
> > pic-somehow-encoded
> This is the tricky part.. Image encoding must be direct hex stream
(1,2,4
> or 8 bits per pixel, greyscale) ... This is not what I want to do with
PHP.
> (it's good on many things.. ;)
> > swipswopswap show-picture-somehow
> > ... goddbye and that ...
> >
> >if pdf is text this looks like a
> >template with some placeholders,
> >where rebol can paste in this stuff?
> >
> >hm. if /view could dump its faces to pdf.. dreaming
> Hmm.. Dumping them on PS would help too..
> Joanna
> >Volker
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.