Denard Springle said the following on 01/27/2011 02:55 PM:
>    No worries. I will refrain from using this group to try and help
> BlueDragon users with furthering their understanding and familiarity
> of the language. I'll just stick with helping the folks of *that other
> commercially available* platform instead. I hate trolls. :(
Don't you think they every one is overreacting a bit?  Let me give some
perspective.  I think Alan took Denny's original message as "aimed" at
him because Denny replied to his message (a downfall of threading in
email clients).  In all reality, these are just email messages and even
if the best intentions they can be construed out of context.  Now let's
get back on topic...

ImageNew() is no different that StructNew(), ArrayNew(), etc.  CFML as a
language doesn't really expose objects to us.  ImageNew() is a data type
and nothing less.  In my opinion, this is a really shame that this
wasn't the direction that was taken.  All the ImageXXX() functions
polluted the root namespace of the language.  The same applied for all
the SpreadsheetXXX() functions.  So I'm with Alan that it should have
been things like img = ImageNew(); img.resize().  So I think Alan and I
are in agreement here.

In regards to compatibility, here are the results I see on CF8:

<cfset img = ImageNew() />
<cfdump var="#ImageInfo(img)#"/>

-> empty struct

<cfset img = ImageNew('', 0, 0) />
<cfdump var="#ImageInfo(img)#"/>

-> Throws exception "Height and width parameters should be non-negative."

<cfset img = ImageNew('', 1, 1) />
<cfdump var="#ImageInfo(img)#"/>

-> struct of image info

I think this confirms my assumption that ImageNew() is merely a datatype
that needs data.  I vote for no change in behavior and no defaults set
just for compatibility reasons.

Best,
.Peter

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 official manual: http://www.openbluedragon.org/manual/
 Ready2Run CFML http://www.openbluedragon.org/openbdjam/

 mailing list - http://groups.google.com/group/openbd?hl=en

Reply via email to