06-20-2011 05:12 AM
I have an UIR done with CVI 5. which includes several ring controls in which I inserted several PCX images. As the UIR is quite complex and should fit the screen, I used the option "Size Image to Control" for all controls.
It worked fine and was quite impressive.
Recently, I tried to migrate this UIR to CVI 7 (Last version to work on NT). The option "Size Image to Control" causes the image to be very unclear - few pixels, every line turns in several sparsed dots... IT DOES NOT WORK!!!
I need some help with this.
06-21-2011 02:42 PM
Hi YOS,
I tried importing a PCX image into CVI 2010 and then sizing the image to the control and didn't see the behavior you have been describing. Would you mind posting an example (alongside an image file) that demonstrates this?
Also, one thing I noticed is that PCX images appear to be quite dated. Could upgrading them to a JPEG or PNG format be an option for you?
Thanks,
Stephanie R.
National Instruments
06-27-2011 07:05 AM
@srdfrn wrote:
Hi YOS,
I tried importing a PCX image into CVI 2010 and then sizing the image to the control and didn't see the behavior you have been describing. Would you mind posting an example (alongside an image file) that demonstrates this?
Also, one thing I noticed is that PCX images appear to be quite dated. Could upgrading them to a JPEG or PNG format be an option for you?
Thanks,
Stephanie R.
National Instruments
Stephanie, thanks for the reply.
I am very sorry to state that I made a mistake.
VAL_SIZE_TO_IMAGE indeed works.
What fails to work is VAL_SIZE_TO_PICTURE. (Second option in Fit Mode attribute in control editing panel)
I tried with JPEG and it's the same.
I am attaching an example.(Load_Image.c & ONEP_3Trow_POS1.JPG)
A panel with two picture rings.
- SW_1 remains at the intended size and the loaded picture is not clear.
- SW_2 will fit to picture size and looks OK.
Appreciate your support,
YOSsi Seter
06-28-2011 03:35 PM
Hi YOSsi Seter,
Unfortunately, this is expected behavior with an image like that. As you decrease its size, it drops in resolution. Because the posted image is so simple, this translates to missing lines. You can see the same results if you resize that JPG in MS Paint, as well. One option for a workaround would be to write an algorithm that draws that image on a canvas control, since it's pretty simple (just a few circles, lines, a rectangle and an arrow).
Hope this helps!
Regards,
Stephanie R.
National Instruments
06-29-2011 12:14 AM
But it worked fine (and still works) with CVI 5.01?!
What's the difference?
06-29-2011 04:59 PM
Ah, actually I do not know what changed between these versions of CVI. Thus, I've filed a bug report with R&D (ID# 306560) so they can take a closer look at the issue. Whenever we have an answer to this, we'll post back here on the forum.
Thanks!
Stephanie R.
National Instruments