• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp100
r3wp1400
total:1500

results window for this page: [start: 1201 end: 1300]

world-name: r3wp

Group: Core ... Discuss core issues [web-public]
Maxim:
16-Jun-2009
henrik: the GC doesn't deallocate on demand... you can have several 
hundred megs of RAM allocated... and sundendly the RAM goes down. 
 and some things do not cause the rebol executables to shrink.


images, in my experience cause memory leaks, where they never get 
de-allocated from RAM under some circumstances.


in theory if you remove all references to a context, its content 
is supposed to deallocate, but when passing anything through view, 
all bets are off.

I've had 400MB pictures stay stuck in RAM, with absolutely no GC 
happening, not even going through view... just loading the image, 
without assigning it... its stuck  :-(
Maxim:
16-Jun-2009
load %some-image.png


not even assigned once... causes a permanent memory use in the last 
version of which I had to use huge images.  I ended up using image 
magic which was able to use the equivalent of 20 GBs of image data 
in a single 75 minute composition.
Henrik:
16-Jun-2009
that's quite a problem, but is it possible to allocate space and 
load new image data into that location?
Oldes:
16-Jun-2009
There is a difference between loading image using 'load function 
and loading using 'load-image function (which is used by VID). The 
second one stares data in cache.
Henrik:
16-Jun-2009
Maxim, you said that the problem occurs when the image has been used 
in View. What if the face object that was created for the image was 
not properly unset, like we've talked about above?
Oldes:
16-Jun-2009
Maxim, do you know this:
>> view layout [image %/f/IMG_0783.jpg]
>> second second :load-image
== [%/f/IMG_0783.jpg make image! [1024x768 #{
4E707A59767C5D7172565F5A4D4E464E4A3F554D4258504558494254453E
4F40394E3D364A373148332E...
Oldes:
16-Jun-2009
?? load-image
Maxim:
16-Jun-2009
oldes... no I didn't know this.

but I never let view load images on its own, I always control that. 
 I didn't even know about load-image  ;-)
Maxim:
16-Jun-2009
henrik, if a face isn't unset properly, for sure the image will stay 
stuck in ram... since one reference to it exists.

BUT


I've previously realised that using the stylesheet system actually 
runs init on each face when you build the stylesheet.  as the stylesheet 
is linked within the faces, each stylesheet will effectively constitute 
a memory reference on some resources.
Maxim:
16-Jun-2009
now that I think about it... its not loading the images, it was using 
make image which caused the memory leak... if you call 400MB a "leak".
Maxim:
16-Jun-2009
this is for a pretty insane project I have which will use up about 
30-40GB of image data (once loaded pictures take up much more space 
than on disk, obviously), per output picture.
Maxim:
16-Jun-2009
but i need to build the software first, and right now.. that depends 
(again) on R3... I will be using OpenGL to build the output image 
setups, then dumping the info to a monstrous image magic process, 
which in the end might actually process more raw image data than 
my HD actually can contain.  I expect render times in number of days. 
 (4 pictures on a much smaller canvas took more than an hour).
Maxim:
16-Jun-2009
I'd like to use hdri imagery.  but with image size that can reach 
in exces of 100mb per picture... its a bit prohibitive on the amount 
of pictures you can take before offloading.
Maxim:
16-Jun-2009
I need to pay the RAID tower, the hours I'll pour on programming, 
photography, img tagging and output image synthesis qualities, etc. 
 publicity and find a few places to show off the end-results... which 
sometimes has to be paid in advance...  


life is so simple when you have no interests... sometimes I'd like 
to be that way for just a few days a year... hehehe.
Anton:
17-Jun-2009
It may not seem obvious, but 

	view layout [image %file.png]

does make use of LOAD-IMAGE, as Oldes pointed out.
Here is where the IMAGE style does it:

	print mold get in svv/vid-styles/image/multi 'file
Nicolas:
14-Aug-2010
I'm having difficulty using the find function to find an image in 
an image. The image specification seems to indicate that this should 
be fine. Is this a known issue?
Nicolas:
14-Aug-2010
;Rule30
rule30: to-image layout/tight [box 6x1 yellow edge none]
foreach n [2 5 6] [poke rule30 n orange]

;Img
screen: system/view/screen-face

img: draw make image! screen/size  reduce ['pen 'yellow 'fill-pen 
'yellow 'box 0x0 screen/size]


img: at img img/size/x / 2
change img orange
img: at img -2x0
width: 3


it: copy/part rule30 3
find img it
Nicolas:
14-Aug-2010
Am I doomed to convert the image to binary?
Gabriele:
16-Aug-2010
>> lay: layout vid-context/to [f: field g: button] 'ctx
>> ? ctx
CTX is an object of value: 

   f               object!   [type offset size span pane text color 
   image effec... 

   g               object!   [type offset size span pane text color 
   image effec...
Group: !RebGUI ... A lightweight alternative to VID [web-public]
Graham:
16-Apr-2007
Just tried out tour.r and yes, it seems to work .. except that when 
you click on the tab, the screen is corrupted.showing parts of the 
titlegroup image.
Ashley:
18-Apr-2007
A simple tree widget, suitable for request-dir, is in development.


I hope that R3 splits VID off as an optional dialect (much like the 
SDK already does), leaving View as the raw graphics engine to which 
many domain specific dialects can be written (e.g. an animation dialect, 
a gaming dialect, an HTML dialect, etc).


I'm hoping R3 introduces at least these View changes at a minimum:

	Rich Text Support

 Different face types (e.g. min-face, text-face, draw-face, image-face, 
 etc)

 Fixes the long-standing detect face bug (or defines the current behaviour 
 as being correct)
Louis:
22-Oct-2007
In the following script I would like to be able to click on a row 
of the table to populate the data entry fields, so that I can edit 
the data for the record displayed in that row. How do I do that? 
 

rebol []
do %sqlite.r
do %rebgui.r
unless value? 'ctx-rebgui [

    either exists? %rebgui-ctx.r [do %rebgui-ctx.r] [do %rebgui.r]
]
set-colors
tab-size: 120x55

fonts: reduce [font-sans-serif font-fixed font-serif "Courier New"]
if not exists? %id.txt [write %id.txt 1]
either not exists? %indodex.db [
    CONNECT/create %indodex.db

    SQL "create table base (ID, Title, Nama, Alamat, Kota, Propinsi, 
    Telefon, Handfon, Fax, Email, URL, Tgl_Nikah, Nota)"

    SQL "create table birthdays (ID, Nama, Jenis, Hubungan, Tgl_Lahir, 
    Agama, Nota)"
][
    CONNECT/flat %indodex.db
]

do show-cc: make function! [] [
set-colors
(i: to-integer read %id.txt)
label-width: 19
f-width: 59
display "IndoDex Ver. 1.0.1" compose/only [
            button-size 16x8
            margin 1x1
            space 1x1
            ;image %roladex.jpg 
            ;return
            label 7 "ID:" id: text (to-string i) 7
            pad 17
            ;label 13 "Nama:" 

            title: drop-list 30 #W "Pak" data ["Pak" "Ibu" "Sdr." "Sdri." "Drs." 
            "Dr." "Tuan" "Nyonya" "Nona" "Pdt."] 17x5
            nama: field f-width
            label label-width "Telefon:" 
            telefon: field f-width
            label label-width "Handfon:" 
            handfon: field f-width
            return
            pad 31
            label label-width "Fax:" 
            fax: fax: field f-width
            label label-width "E-Mail:" 
            email: field f-width
            label label-width "URL:" 
            url: field f-width
            return
            pad 31
            label label-width "Alamat:" 
            alamat: field f-width
            label label-width "Kota:"
            kota: field f-width
            label label-width "Propinsi:"
            propinsi: field f-width
            return
            pad 31
            label label-width "TglNikah:" 
            tgl_nikah: field f-width
            label label-width "Nota:" 
            nota: field 139
            return
            return

            t: table options ["ID" left .03 "Title" left .04 "Nama" left .2 "Telefon" 
            left .16 "Handfon" left .14 "Fax" left .14 "E-mail" left .15 "URL" 
            left .15] data (sql "select id, title, nama, telefon, handfon, fax, 
            email, url from base") 270x150 
            return
            button "Add" [
                either all [nama/text <> "" nama/text <> none][

                    SQL reduce ["insert into base values (?, ?, ?, ?, ?, ?, ?, ?, ?, 
                    ?, ?, ?, ?)" id/text title/text nama/text alamat/text kota/text propinsi/text 
                    telefon/text handfon/text fax/text email/text URL/text tgl_nikah/text 
                    nota/text]

                    insert t/data SQL "select id title nama alamat kota propinsi telefon 
                    handfon fax email URL tgl_nikah nota from base"

                    ;a: sql/flat "select id/text title/text nama/text alamat/text kota/text 
                    propinsi/text telefon/text handfon/text fax/text email/text URL/text 
                    tgl_nikah/text nota/text from base"
                    ;sql reduce [insert table/data a]
                    id/text: form i: i + 1
                    save %id.txt i
                    clear-text nama
                    clear-text alamat
                    clear-text kota
                    clear-text propinsi
                    clear-text telefon
                    clear-text handfon
                    clear-text fax
                    clear-text email
                    clear-text url
                    clear-text tgl_nikah
                    clear-text nota
                    ;show id
                    t/redraw
                    return
                ][
                    alert {Cannot save if "Nama" field is empty.}
                ]
            ]
            button "Update" []
            button "GUI Info" [

                print [id/text " " title/text " " nama/text " " alamat/text newline]
            ]
            button "DB Info" [
                print [TABLES newline]
                SQLite/col-info?: true
                newline
                print [SQL "select * from base" newline]
                print [SQLite/columns newline]
                print [ROWS "base" newline]
            ]
            button "Halt" [
                halt
            ]
            button "Quit" [
                quit
            ]
]
]
do-events
Graham:
25-Oct-2007
I'm putting in some background text as an image as a prompt to users, 
but it would be nice to clear the background image as soon as the 
user click types anything like those search fields in browsers
Graham:
25-Oct-2007
like this   field effect (to-image layout/tight [ backdrop white 
text "enter search term" ] font-color 230.230.230 ) [ aspect ]
Graham:
25-Oct-2007
(to-image layout/tight [ backdrop white text "enter search term" 
 font-color 230.230.230 ] )
Ashley:
25-Oct-2007
How about:


 field %a.png effect [fit] on-focus [face/image: none true] on-unfocus 
 [face/image: load %a.png true]
Graham:
26-Oct-2007
It's getting a bit awkward now .. I have to set the image at startup, 
restore it on an unfocus event, and then restore it again if I clear 
the field.

I think I need to store the image in the field itself .. perhaps 
as a new type of field widget
Graham:
30-Oct-2007
I tried setting lo/pane/1/image but that sets the image to the first 
widget in the layout
Ashley:
31-Oct-2007
button 10x10
	do [face/image: my-image face/effect: 'fit]
]
Ashley:
31-Oct-2007
 Is there any way to circumvent this for items that need a specific 
 pixel size, in my case a picture?

 image defaults to size -1x-1 which means *not* specifying a size 
 will default it to the image size.


 Is it possible to resize the window when my picture is changed, so 
 that the new picture doesn't get resized to the previous one's size?
 This should get you going:

	display "" [
		button [face/parent-face/size: 320x240 show face/parent-face]
	]


Note that in this case the size *is* in pixels as you are modifying 
a face object directly (as opposed to specifying a wudget's *unit* 
size). Hope that helps.
Ashley:
31-Oct-2007
code for the layout backdrop?
 As above:

	display "" [
		button 10x10
		do [face/image: my-image face/effect: 'fit]
	]

or:

	display "" [
		button 10x10
		do [face/image: load %my-image.png face/effect: 'fit]
	]
Micha:
9-Nov-2007
so as on this image  http://jacek.x10hosting.com/test.jpg
Micha:
10-Nov-2007
how to  show image ?
Micha:
10-Nov-2007
dispray [ panel: panel white 80x12 data [ ]

button "img1" on-click [ panel/image: load %img1.png]

button "img2" on-click [ panel/image: load %img2.png]

]
Robert:
10-Nov-2007
Micha, a "show panel" is missing after setting /image
Robert:
10-Nov-2007
And, I don't think that PANEL has an /IMAGE ;-)
Robert:
10-Nov-2007
my-pic: image ...
my-pic/image: load %img1.png
show my-pic
Ashley:
24-Dec-2007
BTW Robert, please don't feel any of the work you and Cyphre have 
done is wasted or unappreciated. You created a solid fork early on 
that meets your requirements. The chart widget in particular just 
blows me away whenever I see it (you should post an image of %test-chart.r 
somewhere, it's one of the most beautiful displays I've seen). Even 
though none, or only a few, of the widgets you sent me may ever make 
it into the standard distro; they have proven invaluable as a source 
of ideas, coding techniques and motivation. Many specific things 
you did (e.g. tool-tips) have slowly but steadily migrated across.
Ashley:
24-Dec-2007
I've had to do something similar and you really need pixel-level 
precision with a domain specific app (or widget). Isn't that hard 
as the number of form elements is limited. The version I was doing 
was trying to automatically place and size fields after filtering 
the form to create a B&W image (for element placement purposes). 
Another approach might be to create a widget that lets you easily 
move and size boxes, then save the face offsets and sizes and apply 
them to a RebGUI display that has the same number of widgets in the 
same order.


I'll take a look at check, led and radio-group sizing later this 
week. All these widgets *should* be able to scale without a problem 
(much like symbol does). In fact I was contemplating using webding 
symbols (for the tick and cross) in lieu of draw.
Luis:
26-Dec-2007
Ashley, I would like to know how can I change the selected-unselect 
colors of tabs.
I wish tabs as:
http://en.wikipedia.org/wiki/Image:Vertical_tabs_sample.png 
or at least:
http://www.useit.com/alertbox/tabs.html
Reichart:
27-Dec-2007
I will prep up some logos, and a few alternative treatments.


You can actually simply take anything you like from Quilt.  The art 
is not complete, let alone finished.  Meaning, I have to go clean 
everything up in the next 30 days.  The art is being designed to 
allow several concepts:

-	Faster rendering through HTML.

-	Ability to change the colour theme with nothing more than a few 
simple CSS changes (o art changes).


For example, the Search icon is really a white magnifying glass, 
with a Knock out (alpha channel).  This way, the Search input and 
button are nothing more than a table with a cell with a green outline, 
and a box that is solid green.  Add the small image and presto, custom 
widget.  One can simply change the colour for a new look.
Ashley:
31-Dec-2007
Uploaded build#112 with extensive changes.


1) scroll-wheel support added to scroll-panel (CTRL+Scroll to scroll 
the horizontal scroller)

2) set-values and get-values fixed (added support for scroll-panel 
and fixed a few bugs)

3) Added a new widget, pill, that is basically a box with rounded 
corners

4) Changed the look of tab-panel so that the current tab is same 
as page background and remaining tabs have a solid color

5) splash requestor now accepts a file! or image! (so you're not 
forced to provide a spec block if you already have an image)
6) Experimental new logo

7) Color management is being totally overhauled (I'll post separately 
on this topic)


*** Do not sync this build if you want to retain the "old" look & 
feel ***
Reichart:
1-Jan-2008
Vertical tabs - What are anyone's thoughts on vertical tabs?  They 
look cool, and I can see their use, but they strike me as...well...annoying, 
similar to my issue with Rotary (spinner).  Rotating or obscuring 
information just seems not worth it.

Here is an image of vertical tabs 
http://en.wikipedia.org/wiki/Image:Vertical_tabs_sample.png


Coloured tabs - As to colouring tabs, interesting.  I'm a big opponent 
of colours generally.  One of the most common requests we get on 
our Calendar is to be able to colour meetings.  We ARE indeed going 
to allow this, but I think it is better to keep things neutral.  
On the Mac, meetings are "categorized" into things like Work and 
Personal, each of which are given colour.  This works well in "personal 
calendar systems", but this breaks down very quickly when working 
in a "collaborative calendar system".  

Who gets to decide the colour of something?

What is "something"?  As in, is it by project, by who is in it? By 
what it is (a meeting, a flight, a memo, a call, or other things 
people can put on a calendar now).

All very tricky.
DanielP:
3-Mar-2008
** Script Error: draw expected image argument of type: image pair
** Near: draw [
    pen yellow
    line 20x20 80x80
]
Ashley:
16-Mar-2008
Certainly possible (creating an image of a display is trivial), but 
how would it be used / specified in practice, and what would we call 
this new widget? Perhaps a grouping widget?

	fan data [
		display "A" [...]
		display "B" [...]
		display "C" [...]
		...
	]


which would create a series of clickable display icons ... click 
the icon and that display comes to the foreground. Is that sort of 
what we are talking about?
Ashley:
16-Jun-2008
Pekr, using rebface instead of rebview will make a big difference 
as rebface excludes VID and all help text is stripped out. On OS/X 
I get the following:

REBFACE
>> stats

== 2085621
>> recycle
>> stats
== 1911437

REBVIEW
>> stats
== 6260880
>> recycle
>> stats

== 4810174


You can also create a custom RebGUI build that excludes widgets you 
don't intend using (see http://trac.geekisp.com/rebgui/browser/create-distribution.r
) which will save a few more bytes. Lastly, make sure your app does 
not use any unneeded images (e.g. a background image when a simple 
draw effect might suffice).


Even with these measures you'll only be left with about 3MB free 
... but 3MB is better than 1MB.
amacleod:
28-Aug-2008
** Script Error: listview has no value
** Where: layout

** Near: listview 80x60 data [["Title 1" text "Title 2" check "Title 
3" image "Title 4" image "Title 5" text] ["Line 1:1" fals
e l...
Claude:
6-Oct-2008
for this code working you need   REBDB-203 & REBGUI build 116 in 
the same folder of this code and a folder "images" with an image 
like this %./images/setup.png
Louis:
30-May-2009
Graham and Izkata, thanks for the help.  But I must be misunderstanding 
something, as it is still not working. Here is what I have:

CONNECT/create/flat %cl.db

if error? err: try [
	SQL "select * from projects"
][
	er: disarm err
	if find er/arg1 "no such table" [

  SQL "create table projects (Priority, ProjectName, ExchangeRate, 
  Objectives, Deliverables)"
	]
]

do show-cc: make function! [] [
	display "CRITICAL LINKS Version 1.0.0" compose/only/deep [
		;image %chain.jpg
		return

  group-box "Critical Chain and Theory of Constraints principles" #W 
  data [

   text "1. REMEMBER YOUR PURPOSE" font [color: blue size: 26 shadow: 
   1x1]
			return
			;bar
			;return

   text "2. Free Up Your Major Constraint" font [color: red size: 20 
   shadow: none]
			return

   text "3, Focus on one project at a time---don't multi-task." font 
   [color: black size: 12 shadow: none]
		]
		at 103x14
		image %critical-chain.jpg 30x6
		at 133x2
		group-box "Redeem the Time" #W data [
			after 2
			label "   System Clock Time:" my-time:    text 28x7 "0:00:00"
			return
			bar
			return
			label "Average session time:" my-session: text 28x7 "0:00:00" 
		]
		return


  ;******************************************************************
		tab-panel #HWLV data [

                           ;******************************************************************
			"Projects" [
				label "Project Name:" ProjectName: field  141x5 

    label "Priority:" Priority: drop-list 30 #W "1" data ["1" "2" "3" 
    "4" "5" "6" "7" "8" "9" "10"] 10x5
				return
				label "Objectives:" 
				pad 131
				label "Exchange Rate" ExchangeRate: field 20x5
				return
				Objectives: area 200x10 
				return
				label "Deliverables:" 
				return
				Deliverables: area 200x10
				return
				label "Current Projects:"
				return

    current-projects: table (tab-size + 80x35) #HWLV options ["Priority" 
    right .03 "ProjectName" left .2 "ExchangeRate" left .2 "Objectives" 
    left .3 "Deliverables" left .1] data [(SQL "select * from projects")]
				return

                                                     button "Save" [

                     SQL reduce ["insert into projects values (?,?,?,?,?)" Priority/text 
                     ProjectName/text ExchangeRate/text Objectives/text Deliverables/text]
				    current-projects/redraw
			              ]
                                                      pad 20

                                                      radio-group 60x5 data [1 "Add" "Edit"]
				pad 20
				button "Quit" [quit]
                                         ]
Pekr:
3-Aug-2009
- title-group and image RebDoc section depend upon images from /images 
directory, which are now deleted hence not available anymore ....
Ashley:
5-Aug-2009
title-group and image RebDoc section depend upon image ...
 Fixed in next build
scrollbars are behing a little weirdly
 ... noted

basically when one specify [button 100] one get old [button 103] 
but that's ok if we know it
 ... ah, I understand the issue now. Fixed in next build.

I hope somebody else was using this feature so it's not only me using 
before and wanting it.

 ... don't worry, I think the issue is that table needs to differentiate 
 between a selected row and a row that has focus. This was not an 
 issue in previous versions as table was not a tabbable widget. Will 
 be fixed in a future build.

Drop-list and edit-list cannot be closed by clicking elswhere but 
this is still to be fixed, isn'i it.
 ... on the list to fix
Another little observation.

 ... that's an interesting bug and I have no idea at this stage why 
 the 2nd case doesn't work. Needs further investigation.


Good work marek (and others) ... we're slowly but surely ironing 
out the issues.
Ashley:
5-Aug-2009
Build 204
- Fixed old refs to %images in anim, image & title-group
- Moved stock images into a new images object
- Changed refs to above
- Fixed button size bug
- Reverted wait [] behaviour
Ashley:
6-Aug-2009
Build 205
- Added request-list
- Added request-email
- Added do-events
- Updated request-spellcheck (added image)
- Updated request-error
- Updated request-value
- Label size now defaults to 25x5 (was -1x5)
- Replaced "attempt" logic tests with "error? try"
- Memory footprint drastically reduced
- Added no-wait to display func
- Updated request-progress to use display/dialog/no-wait
- Fixed button over state bug
- Fixed slider jerkiness
Ashley:
7-Aug-2009
LED design is absolutly terrible
 ... please provide a link/image of a better design

Why horizontal scroller shows different dragger symbol than vertical 
one?

 ... vertical uses "=", horizontal wasa "||" but those characters 
 don't center to well

what is the active part of the scroller, and what is the background
 ... you mean the dragger is hard to distinguish from the gutter?
Other than that (and pop-up bugs)
 ... table, text-list and tree still need a lot of work
zero-divide error with  tour.r
 ... thanks, added to the list of bugs to fix
Ashley:
14-Aug-2009
You're on the right track. I'm trying to get an image in there without 
creating another face. The 3 places you can have an image in an existing 
face are: image, effect and edge. The first image I want to get in 
there is a folder icon so request-dir looks a bit better! ;)
Graham:
24-Aug-2009
Ashley, I get this when I encap the latest rebgui.r 

** Script Error: Cannot use path on none! value
** Where: load-stock
** Near: if not image: find system/view/vid/image-stock
** Press enter to quit...
Graham:
24-Aug-2009
Here's my encap code

probe in system/view/vid 'image-stock  ; this works

#include %/c/rebgui10/rebgui.r ; 9/rebgui/rebgui.r

probe in system/view/vid 'image-stock ; this fails now

and here's the output 

image-stock
** Script Error: in expected object argument of type: object port
** Near: probe in system/view/vid 'image-stock

the error occurs on the second probe
marek:
5-Sep-2009
I found another bug in version 213. 

Yesterday I managed run %create distribution.r after recreating %btn.r 
and %chat.r widgets first. Today I found out that some requestors 
don't work:-
>> alert "test"
** Script Error: image has no value
** Where: layout
** Near: image images/alert 
text 60 "test"
>> 


It works from original %rebgui.r file. It seems that images exist 
in re-created one, but they cannot be found. Unfortunatelly, I've 
got no idea how to fix it
Ashley:
7-Sep-2009
Build 214
- updated toggle (2x2 edge on select)
- added missing btn widget
- added missing chat widget
- added flash requestor
- added request-about
- renamed request-password to request-pass

Flash is used as follows:

	...
	flash "message"
	...
	hide-popup
	wait []
	...

request-about is used as follows:


 request-about/url "MyProj" 0.0.1 "Copyright (c) MyCo" "www.site.com" 
 ; or a url!


Note the logo is located in ctx-rebgui/images/logo and defaults to 
the info icon ... replace with your own logo image as follows:

	ctx-rebgui/images/logo: load %my-logo.png
Claude:
2-May-2010
hi, i would like to change the image of a variable
Claude:
2-May-2010
my-image: image %./nophoto.jpg
Claude:
2-May-2010
i try this but i have a black image !!!!!
Claude:
2-May-2010
my-image/image:  make image! 60x80 load %./Photos/test.jpg show my-image
Claude:
2-May-2010
is missing a set-image ;-)
Claude:
2-May-2010
iam stupid ;-)    my-image/image: load-image %./Photos/test.jpg show 
my-image
Ashley:
9-May-2010
Replace 'load-image with 'load unless you want to cache the image.
Group: !REBOL3-OLD1 ... [web-public]
Sunanda:
5-Jan-2009
Have you thought about using CALL to create temporary extra versions 
of REBOL.exe for the image processing? That's solve some of the issues. 
Though it would be clunky!
Maxim:
5-Jan-2009
yess I did, but in this case, the goal is to do interactive AGG manipulation 
of one image at a time and stamp it on a layered composition.  by 
the time I load the third image (from a digital camera at 7.1 MPixel), 
rebol crashes  :-(
Maxim:
5-Jan-2009
henrik: you mean something like:

imgbin: read/binary %image.png
img: to-image imgbin

?
Maxim:
5-Jan-2009
it was probably related to using the image in view or AGG specifically, 
or maybe specifically to using a png format image.
Maxim:
5-Jan-2009
image magic rendered the equivalent of 100GB of image data for 1h30 
at 100% CPU usage (and only a few hundred MB or RAM) and didn't fail... 
so I was very impressed by it, in any case
Janko:
4-Feb-2009
it's a forth + lisp + haskell sort of language .. it's stack and 
image based
Henrik:
6-Feb-2009
No, this is internal to REBOL. RGB values are incorrect in the image 
data that is produced from MAKE IMAGE!.
Ammon:
24-Feb-2009
view [image %/path-to-img/img.jpg] 

doesn't work for me.
Henrik:
24-Feb-2009
ammon, image loading is not available at this time.
Henrik:
24-Feb-2009
there used to be a jpeg loader, but it has been removed for now due 
to changes in LOAD and we're awaiting mediatypes, which would handle 
image loading.
amacleod:
27-Feb-2009
Actually size of the image does not seem to be the prob as this works: 

SQL reduce [{insert into images values (?,?,?,?,?,?,?,?)} "img/1" 
"img/2" "img/3" "img/4" "img/5" pic "img/7" "img/8"]
where pic is a large 4000x3000 full color photo.
I get no error.

But if I loop 50 and insert the above data 50 times I get an error???
Henrik:
8-Mar-2009
I think you can load an image into R2, mold/all save it as an image! 
and load it into R3 that way.
Pekr:
10-Mar-2009
Maybe it would be best to add 'effect and 'rich-text functionality 
to draw directly, as image is there too anyway. Would make it for 
one combined pipeline. Dunno how it would make low-level implementation 
more complex. Then we could discard other gob types ....
Henrik:
13-Mar-2009
http://rebol.hmkdesign.dk/files/r3/gui/093.png

Some shapes in this image was done that way.
Geomol:
13-Mar-2009
sx: sy: 1
lw: 10
clip-tl: 20x20
clip-br: 380x380
sz: 400x400
color0: orange
color1: 0.0.228
color2: gold
icon: make image! sz

image: [
    transform 0 sx sy 0x0 0x0
    pen none
    fill-pen color0
    box 0x0 400x400 50
    fill-pen color1
    box 20x20 380x380 30

    clip clip-tl clip-br
	pen black
    fill-pen color2
    line-width lw
	arc 65x335 305x305 180.0 360.0
    fill-pen color1
	arc 65x335 148x148 180.0 360.0
    fill-pen color2
	arc 65x335 56x56 180.0 340.0
    clip 0x0 sz
    pen black fill-pen white
    line-width lw
	line-join round
	push [
	scale 0.9 0.9
	translate 20x20
	shape [
		move 221x60
		line 85x60 85x349 187x349 187x255 230x349 340x349 264x238
		curve 264x238 323x218 323x152
		curve 323x152 323x60 221x60
		move 204x187
		line 187x187 187x137 204x137
		curve 204x137 225x137 225x162
		curve 225x162 225x187 204x187
	]
	]

    fill-pen none
	pen color0
    box 10x10 389x389 44
	pen black
    box 15x15 384x384 40

    pen none line-width 0
    fill-pen linear 0x0 0.0 110.0 90.0 1.0 1.0
		255.255.255.40 255.255.255.120 255.255.255.200

    shape [move 400x80 arc 0x80 400.0 300.0 line 0x0 400x0 400x80]
    fill-pen linear 0x290 30.0 110.0 90.0 1.0 1.0
		255.255.255.255 255.255.255.192 255.255.255.128

    shape [move 0x300 arc 400x300 600.0 200.0 line 400x400 0x400 0x300]
]
view center-face layout [
	origin 0
	across

	b: box 400x400 black effect [draw image][
		file: request-file/only/save/file %rebol-icon.png
		if not file [exit]
		if not find file ".png" [append file ".png"]
        img: make image! b/size
        img2: make image! b/size
        img2/alpha: 255
		draw img2 [pen none fill-pen black box 0x0 400x400 50]
		draw img image
		img/alpha: img2/alpha
		save/png file img
	] return
	btn "Color 0" [color0: request-color/color color0 show b]
	btn "Color 1" [color1: request-color/color color1 show b]
	btn "Color 2" [color2: request-color/color color2 show b]
]
ICarii:
28-Mar-2009
rendering to draw/image then using the data as textures over GL frames 
requires the individual fontmetrics.
Anton:
3-Apr-2009
[ This whole post is mainly in the R2 mindset, but is somewhat relevant 
also to R3. ]


The technique of setting words directly into the global context like 
this:

	context [
		set 'o ...
	]


I do not like, because this code is modifying its environment - it 
has side-effects - thus, it is non-modular, and does not scale.

Being non-modular means large software systems can't be built up 
reliably, because the cumulative effect of all those side-effects 
will eventually cause name-clashes in the global context, so that 
some word exported from one context will be overwritten by the same 
word exported from another context.

For example, suppose I've seen two graphics demos by two different 
authors. They each have an awesome graphics processing routine and 
I decide that I would like to combine both routines into a single 
program. They each wrapped their code up in a context and exported 
a word 'process-image, like so:

	; From author #1
	context [
		set 'process-image does ...
	]

	; From author #2
	context [
		set 'process-image func ...
	]


You can imagine that each of these "modules" also has a large amount 
of supporting code, local variables and functions, and each is in 
a large file on the respective author's website. Somewhere in the 
middle of each of these files, in the CONTEXT body code, are the 
SET lines which export the words into the global context.

When I write my program to combine both of these "modules", I will 
probably write code like:

	; Acquire all dependencies
	do %image-processor.r  ; By author #1
	do %super-gfx.r  ; By author #2

	; Create an image and manipulate it.
	my-image: make image! 400x400
	process-image my-image ...


and here I realise that there is a name-clash with the 'process-image 
word, which is set only to the value exported by the second author.
So what do I do?

Here are some theoretical approaches, which have their own problems.

1) I could reload each file just before use:

	do %image-processor.r  ; By author #1
	process-image my-image ...
	do %super-gfx.r
	process-image my-image ...


  Each "module" is not expecting to be used this way, so this has problems 
  like:

  - "Static" locals which are intended to remain in memory will be 
  lost each time the file is reloaded.

  - Performance could suffer; each file could be large, and many calls 
  to 'process-image might be done.


2) I could set the first imported word to my own chosen word before 
importing the second "module". eg

	do %image-processor.r  ; By author #1

 process-image2: :process-image  ; Create an alias, as 'process-image 
 will be overwritten next line.
	do %super-gfx.r  ; By author #2

	; Now use
	process-image2 my-image ...
	process-image my-image ...


  But this means that a line of code has been created in the dependency 
  acquisition stage which has a complex interdependence between the 
  two "modules". They are not independent, and so individual dependency 
  acquisition lines can't be easily copied from this code and pasted 
  into a new script and expected to work right away. If copy/pasted, 
  the code will have to be examined, probably in great detail, to discover 
  what's going on and how to make it work. This will lead right back 
  into each source file, where the SET lines which export words to 
  the global context must be found. What great fun that will be in 
  a large software system built using many modules.


Another approach could be to try to bind each module code to a new 
context which contains the exported words, so they are isolated from 
each other... but this is complex.


All the above approaches are attempting to work around a single problem: 
that each "module" is exporting words where and when it likes, without 
consideration for the environment (other "modules", other global 
words etc.) This is "global namespace pollution" and the approaches 
above just introduce more problems in trying to work around it.


The solution to all this, is, in my view, for modules to declare, 
in the script header, the words that are intended to be exported, 
but for the module code not to actually perform the exports. This 
should be done by the user code, at its option. If a large module 
provides an API of 10 functions, then those function words should 
not be forced into the global context. The user script should be 
able to choose which, if any, of those words to import, and into 
which context it would like to import them. Additionally, the exported 
word value should be importable to a differently-named word, which 
can solve the name-clash problem we have above.

If modules do not use SET, but instead declare their "export" words 
in the script header, then digging through code to find side-effects 
should no longer be necessary. In R2, this requires that all module 
authors adhere to this type of module system, and declare their "export" 
words in a standard fashion.


In R3, I'm hoping the module system will develop into one which can 
enforce the modularity of modules, so that a user script can be sure 
that there were no side-effects introduced by loading any module.
Izkata:
3-Apr-2009
So why not do something like this?
REBOL []
[
   process-image: func ....
]
................
image-processor: make object! load %image-processor.r
super-gfx: make object! load %super-gfx.r
image-processor/process-image foo
super-gfx/process-image foo


Static locals stay in memory, there's no extra steps to deal with 
conflicts, no special voodoo..  And, whenever process-image is called, 
it's obvious from where.
BrianH:
3-Apr-2009
Try this:
REBOL [type: module]
process-image: func ....

image-processor: import/only %image-processor.r
...
Anton:
3-Apr-2009
Izkata, that's not a bad approach, but it has these problems:

1) LOADing a module is not quite the same as DOing it. DO sets up 
the current directory and system/script object correctly. LOAD doesn't, 
so the module might not be able to inspect itself and know about 
its location etc.

2) In trying to avoid setting words in the global context, you're 
setting words in the global context. Now you must use paths to get 
to what you want. This should be at the option of the user script. 
Obviously, you're exercising that option in your example. You could 
also do it this way:

 process-image1: get in context load %image-processor.r 'process-image
	process-image2: get in context load %super-gfx.r 'process-image
shadwolf:
9-Apr-2009
R3 doesn't bore me that's just a bad image sent to the word in the 
way it's done that's all. Look before even doing a single thing a 
big company like apple or microsoft start by promoting it giving 
the  features the roadmap the developpers inside point of view etc 
...
Oldes:
9-Apr-2009
Again.. when talking about fonts.. I want bitmaped font support. 
For example I create font's for my Flash apps in Rebol using simple 
image where I draw pixel precise glyphs:
http://box.lebeda.ws/~hmm/fonts/fixedsys.png
And provide the needed informations in Rebol format:

http://box.lebeda.ws/~hmm/fonts/fixedsys.png.txt(using UCS2 to map 
the glyphs)
Then I use my vectorizer to get the Flash font format.

The last step could be skiped in Rebol. And just the bitmaps could 
be used. So as in my Flash apps I can be sure, that the font will 
looks like I really want it!

But first we must have the R3 core stable and opened host sources. 
I will wait:)
Henrik:
6-May-2009
I suspect things like audio samples and very large data sets (geographical 
data, 16-bit image data) could be used for this.
Pekr:
6-May-2009
Steve - how could vector help to speed operations on images, if image 
is separate datatype?
Pekr:
6-May-2009
Steve - isn't convolution (where you set matrix too) enough for image 
manipulation type you mention?
Steeve:
6-May-2009
image/rgb returns a binary serie
Pekr:
6-May-2009
Having the ability to apply some math and matrix operations over 
vectors would be nice. Having the ability to use such functionality 
to modify some binary (e.g. image) would be cool too.
Henrik:
14-May-2009
wow, 23 fixes so far for A54, including some of my old image bugs.
Maxim:
14-May-2009
he actually said something much better... "we need to add native 
image manipulation functions"   :-)
Oldes:
14-May-2009
Steeve, cannot you just get the RGBA raw data and do the math on 
it instead of image directly? Also is your script available. I have 
own script for making vectorial fonts from bitmap but it works on 
black and white tracing (in rebcode)
Oldes:
14-May-2009
or we will get "few powerful natives to manipulate image data directly".:-)
Pekr:
14-May-2009
I don't understand, why XOR and OR should be removed from functioning 
upon image datatype?
BrianH:
15-May-2009
Image is not in any-string! either. The binary! type would remain 
in series!.
Carl:
1-Jun-2009
In fact, it may even be possible to provide your own R boot image. 
 But, maybe that should be special feature... SDK or something.
1201 / 150012345...1112[13] 1415