VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 123456[7]8910 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 17:55:27 06/26/01 Tue
Author: Michel
Subject: Re: RGB property troubles
In reply to: Gregg Van Oss 's message, "RGB property troubles" on 16:35:18 06/25/01 Mon


Hi Gregg,

When doing changes like,

ImageScrollBox1.graphic.RGB[r,r]:=

you need to then call ImageScrollBox.Redraw(True).

In the second situation, I would guess that your are resizing the image with the ZoomPercent property. The ImageScrollBox has to graphic properties: Graphic which is the original non-resized graphic, and DisplayedGraphic which is the resized graphic.

You may want to use the TResizeTranform to directly resize a TGraphic.

Best regards,

Michel

>Iím having some troubles with the RGB property on an
>ImageScrollBox.Graphic. I need to both set values,
>and read values. Setting a value doesnít seem to have
>any effect. For example, I tacked in a test lineÖ
>
>for r:=1 to 100 do
>ImageScrollBox1.graphic.RGB[r,r]:=MakeRgb(255,0,0);
>
>I would expect to see a diagonal red line over the
>existing image, but I donít get that. The line of
>code has no visible effect.
>
>Reading values is a bit hairier. I have an image
>thatís 500x500 in the ImageScrollBox. First, I resize
>the image to 288x288. A check of the
>ImageScrollBox.Graphic.Width confirms that the resize
>transform successfully changed the image size to
>288x288. However, if I use the graphic.RGB property
>to pull out the leftmost 288 pixels (Which should now
>be the entire image), and reassemble them on another
>canvas, I find that Iím only getting the left half of
>the image. Itís as if the RGB property is pulling
>values from the original image, before the resize.
>
>The logic that pulls the values from the
>ImageScrollBox.Graphic.RGB and reassembles them on
>another canvas produces the same result regardless of
>what size I transform the original image to.

[ Next Thread | Previous Thread | Next Message | Previous Message ]

[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.