News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Ernest Murphy's image library

Started by Vortex, March 03, 2005, 04:18:10 PM

Previous topic - Next topic

hutch--

Vortex,

I just tested the 4 demos and they appear to work fine. You should also add the credits for the people who worked on fixing them in the beginning of the source files for the library rather than just naming them in the readme.txt file.

Greate stuff and thanks to everyone involved.  :U

LATER : I added this line to the header of each library module.

;  Corrections have been made to this module by
;  f0dder, El_Choni, lamer, KetilO, QvasiModo and Vortex.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Vortex

Hi Hutch,

Many thanks for testing the library :U

QuoteLATER : I added this line to the header of each library module.

;  Corrections have been made to this module by
;  f0dder, El_Choni, lamer, KetilO, QvasiModo and Vortex.

Also, thanks for adding the lines to the header of the modules.

hutch--

Ok, I have added the 4 files into the current image and they build as normal so they will be available in the next current image of te MASM32 project.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Vortex


raymond

I have adapted the code to my own needs for a small image viewer and "slide show" program and it generally works fine at least with .jpg, gif and bmp files.

One exception I have noticed up to now pertains to the size of .jpg files. Large images (I haven't defined the limit yet but at least 1700x1300) return the error code. And the code occasionally hangs up on very large files such as >2Mb.

Has anybody had a similar problem?

Raymond

P.S. Anybody interested in trying the BETA version of my program? :eek
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com

Vortex

Hi Raymond,

Can you post your image viewer? I think that many of us would be interested.

QvasiModo

Perhaps you're simply running out of memory? That can happen when creating large bitmaps, but I think it's only a Win9X issue.

raymond

#22
For all its worth, here it is. Currently, it's only prepared to view .BMP, .GIF, .JPG and .JPEG.

I'm doing this because I want to make a CD containing scanned slides and photos for my children and provide tham with a program which they can use immediately with a viewer available directly on the same CD.

This idea came about when a nephew prepared a CD of photos for his parents' 50th wedding anniversary, which CD is totally useless unless the MS Office Suite is installed on the computer where one would like to look at those images.

Any comments will be greatly appreciated. The unzipped file size may seem big but it's due to some resources which I will eventually try to modify.

And, yes, I can only test it right now with Win98SE with 128 Mb RAM.

Raymond


[attachment deleted by admin]
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com

ramguru

Very convenient tool, I like it! I see it has some problem with long dir names, you could write: "MyLongDir..." and show a tooltip (with full name) And icons aren't very cute, but since you are trying to minimize resource size ... :)
Bottom line: works perfect on WinXP with SP2 box...

raymond

I've cleaned up the resources and adapted the program for the modifications. The size is thus reduces considerably.

I also added a few instructions to prevent a potential problem with inadvertant erroneous input (i.e. idiot-proofing).

The file in the previous post has been replaced with the newer version.

Raymond
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com

raymond

MYSTERY FINALLY RESOLVED!!!!

Although other graphics programs had no problem with this, Ernest Murphy's procedure will not display files with names which contain the "%" character IF (and only IF) that character is immediately followed by 2 characters which could be interpreted as a hex byte!!!! :eek

For example, files with names as follows would not be displayed, regardless of size:
01%2a.jpg, a234%f6k2.jpg, abc%def.jpg

while files with the following names would have no problem being displayed, again regardless of size:
01%2.jpg, 01%2g.jpg, a234%k6f2.jpg, cde%fgh.jpg

Raymond
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com

QvasiModo

URL decoding? Looks like some IE code is messing with it... what happens if you use two %'s?

01%%2a.jpg, a234%%f6k2.jpg, abc%%def.jpg

Or if you replace the % with %25?

01%252a.jpg, a234%25f6k2.jpg, abc%25def.jpg

raymond

QvasiModo

The only reason I found the effect of the "%" character in the file name was because someone sent me a bunch of photos taken with a digital camera which were probably downloaded to a computer with file names based on the camera's software. An example would be:
009%5F9%2EJPG.jpg

I did not try two consecutive "%". However, I've tried numerous combinations for the characters following one "%" and I would not expect a file name such as 01%252a.jpg to be rendered.

NEW PROBLEM!!!

My system under WIN98SE (128 Mb RAM) stops rendering images after processing some 60 JPEGs (approx. 1800x1200 in the range of 700-900 Kb each) and would even hang up if I continue to attempt rendering more images.

Although I tried that immediately after re-booting the computer fresh, and exited immediately when images stopped being rendered, the system resources were still being indicated as 93% free. But, when I tried to hook up to the internet, the system froze while loading the first page. Ctrl-Alt-Del managed to "End Task" IE but nothing else; I then had to "pull the plug".

I now intend to try learning about the JPG format and see if I can write my own converter from JPG to BMP. :boohoo: Any suggestion about the location of such information will be welcomed.

Raymond
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com

QvasiModo

Win9X stores GDI objects in shared memory, amongst other problems this means that leaking these objects has a global effect, and shared memory is rather scarce so you can't work with bitmaps too large (at least not using GDI). This is not really a problem in Ernie's imagelib so the only thing to do is ignore the problem, or switch to GDI+.  :(

As for the filename problems, I'm puzzled as to why the library seems to treat them as URLs... may be a COM thing, dunno. :dazzled:

hutch--

Ray,

Have a look at the API "GlobalMemoryStatus()" as it will tend to give you different results and it splits up physical and virtual memory so you know what is happening. I put this stuff in the about box in QE back when I used to develop on win98se just to keep track of whether the OS was running out of physical memory.

A quick and dirty way to fix it when the numbers get low is to allocate more memory than the system has then release it and you usually get it all back again.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php