Re: Hotspotmap on image object doesn't work?
Status: Alpha
Brought to you by:
cwalther
From: Christian W. <cwa...@gm...> - 2008-05-12 08:22:44
|
Andrea Viarengo wrote: > Th possibility is described on documentation, but I cannot manage to apply. > > img=pipmak.loadimage("hotspots.gif") > hotspotmap img --line 12 > > produce this error: > > Error loading lua file 1/node.lua:12: '"' expected near img Yes, you need to write hotspotmap(img) Lua only allows the parentheses to be omitted around string literals. See section 2.5.7 "Function Calls" in the Lua 5.0 manual: "A call of the form f’...’ (or f"..." or f[[...]]) is syntactic sugar for f(’...’), that is, the argument list is a single literal string." You're probably tripped up by not realizing that this is a function call. I should probably mention this more prominently in the documentation. > The possibility to use an image obj mean that I could also > add some drawings using img:fill(), before call hotspotmap? No, pipmak.newimage() creates 32-bit RGBA images, while for hotspot maps you need 8-bit indexed images. > A tecnical question, about the code > hotspotmap use indexed image, indexed image need a colormap, these mean > that img obj can distinguish to full image (like jpeg) and indexed image > (like gif/png) storing also in these last cases the colormap? > I believed that one time load image (using loadimage or new getimage), > I loose the original format of the image..is it true? No. loadimage() returns indexed, RGB, or RGBA image objects, depending on what was in the file. newimage(), though, only creates RGBA images. > Should be possible have possibility to enable stdout on windows for > this release? (Also using only command line to set preference) No. Much too late for new features. In fact, I'm just doing the final testing and the release will go out later today. -Christian |