JPEG images (OpenInsight Specific)
At 03 OCT 2000 04:10:40PM Sedick Cloete wrote:
I need to display JPEG images on a form. The classes recognised in OI only consist of BMP and ICO. Is there any way of displaying the JPG image without converting the JPG to a BMP, or extend the classes to recognise JPG images.
At 03 OCT 2000 10:18PM WinWin/Revelation Technical Support wrote:
Sedick-
Create a new Image entity of type BITMAP, and put the path as it really is- eg c:\foo\bar.jpg
The Bitmap control can handle BMP, DFX, EPS, GIF, JPG, PCX, TIF, TGA, WMF, WPG, and more.
Hope it helps-
Mike Ruane
At 04 OCT 2000 01:27PM Sedick Cloete wrote:
Hi Mike,
Thanks for the response. We are currently doing this. Our problem is that we will have a huge database of images, and to create a BMP entity for each JPG image is a pain, or can this be done programatically.
At 04 OCT 2000 02:00PM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:
No Mike is pointing out that BITMAP controls will happily display jpegs.
World Leaders in all things RevSoft
At 04 OCT 2000 02:09PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
You can change this code to match the image type you need.
subroutine update_bmps ( subDir ) declare function repository initDir subDir : '\*.bmp' loop files=dirList() while files more=1 col1=0 loop while more remove file from files at col1 setting more id=SYSPROG*IMAGE*BMP*' : file1,'.' unUsed=repository('NEW', id, 1, 1, 1, '', '', '', '', '', 'Image entity...','.\BMPS\' : file) repeat repeat returnWorld Leaders in all things RevSoft
At 04 OCT 2000 03:57PM Don Miller - C3 Inc. wrote:
Just a thought ..
You can define a single repository entry as a BITMAP. Build a list of files and paths. You can then map any of these into the control and display it IF THEY ARE ALL THE SAME TYPE. What I've done in the past was to make a blank JPG file with some text that says Select Image. There's a control that lets the user pick the image and then it gets stuffed in and will display. Maybe this will work for Sedick???
Don Miller
C3 Inc.
At 04 OCT 2000 04:20PM Oystein Reigem wrote:
Sedick,
Perhaps this seems like a stupid question to you, but to me and my clients and my app it makes sense: Why do you need entities for the images?
- Oystein -
At 05 OCT 2000 12:58AM Robert Lee wrote:
There are two good reasons for switching from .JPG to .BMP in OpenInsight.
1. .JPG display poor quality on the screen.
2. You can't print .JPG's with OIPI or anything else that I know of.
We also have an app where we have thousands of images to display and we certainly don't register every bitmap in the repository. set_property(@window : ".PHOTO", "BITMAP", filename)
where @window : "PHOTO" is a bitmap type entity works fine.
There is free software available on the internet that will convert a whole directories of .JPG to .BMP and will even scale the images so the .BMP files end up a reasonable size. I think I picked up one such piece of software on a website called Devshed.com - I thinkā¦
At 05 OCT 2000 04:26AM Oystein Reigem wrote:
Sedick/Robert,
There are two good reasons for switching from .JPG to .BMP in OpenInsight. 1. .JPG display poor quality on the screen.
It's not JPG. It's 24-bit images. 24-bit BMPs don't display better than 24-bit JPGs.
8-bit images display well: grayscale JPGs and BMPs, and 256 colour BMPs.
At least that's my experience. Please tell me if I'm wrong.
It's a really frustrating issue. My guess is the quality loss is caused by a trivial programming blunder in OI. I don't think it's the Imageman library functions, which OI uses to display images. I have recently managed to display 24 bit BMPs in OI BITMAP controls with perfect quality, by using a combination of Imageman function calls and Windows GDI function calls. Hopefully it works with 24-bit JPGs too. I might use that in my new app. In my current app I recommend my clients to use 8-bit images.
2. You can't print .JPG's with OIPI or anything else that I know of.
That's another frustrating issue. I've been waiting for JPG capabilities in OIPI for ages. But it's a long time since I bothered checking Tony Splaver's site for news on that. (Have you checked recently?)
(Also there's at least one JPG flavour that doesn't display - progressive JPGs. But that's not a reason to switch to BMP, of course. That's just an issue if somebody else decides the format for you.)
- Oystein -