Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
2 user(s) are online (2 user(s) are browsing Forum)

Members: 1
Guests: 1

xushengda0628, more...

Browsing this Thread:   1 Anonymous Users



« 1 2 3 4 (5) 6 7 8 9 »


Re: Are icotools available for AROS?

Joined:
2016/8/16 0:09
Group:
Member
Posts: 247
Offline
Quote:
miker wrote:
I'll run IconToIFF in Amiga OS 3.5 to see what the output file is.

Unfortunately, it crashes for me on 3.1 (classic)

Quote:

Likewise, I believe the program is called "WheelRun" but I haven't downloaded it for AROS yet. Then I can run it and see what output files it has.

There is no (public) AROS version. afaik only a OS4 version.

Quote:

The author's name is Chris Young. Maybe he wouldn't mind comping a IconToIFF version for AROS? End of problem.

True, but there is this itsy bitsy teeny weeny problem

The 'normal' way to implement such a tool as icontoiff would be to use the datatypes system. You can check that by supplying an output format (that is supported by datatypes, so install extra datatypes for 'exotic' file formats).

But, as already stated. AROS is missing some features in its datatype system, rendering the same code unusable.

The easiest way to implement such a tool as icontoiff would be to:
- load icon using datatype system
- save loaded data, using datatype system
- done

For at least the saving parts, the author of icontoiff is using the datatypes system, and exactly the DTM_Write 'action' is missing for AROS.

More on datatypes (e.g. generic information) can be read here.

Posted on: 5/7 17:31

Edited by origami on 2017/5/7 19:16:40
Transfer the post to other applications Transfer


Re: Are icotools available for AROS?

Joined:
2016/8/16 0:09
Group:
Member
Posts: 247
Offline
Quote:

ilbarbax wrote:
Aros of course. I'm mainly an os4 and aros user. For os4 I sorted out the problem while for aros I'm stuck.

I need to extract the picture from the info file. Mi program is a replacement of amidock or amistart. If you want to have a n idea you can look the grab in os4depot searching for wheelrun

@ilbarbax (or anyone else that is able for that matter)

toss me some (link to) 32-bit iff files that uses the alpha channel.

My documentation states that i can simply add the alpha as last planes, but it seems impossible for me to have any program actually view them. all programs on M$ crashes and Multiview is unable to view them (unsupported function).

icon2iff is not running on my machine, and it refuses to tell me why but since it seems to be running on OS4... just toss me something.


@ilbarbax:
It would be nice if you are able to tell me/us how exactly you invoke icon2iff, e.g. what parameters do you use ?

There is simply no way that i am going to add output formats for all:
jpeg, tiff, gif, bmp, png, ppm, pgm, pbm, tga, bmp, fits, ico, img, pam, pcx and whatever more 3 letter acronyms that symbolizes a graphical file format

Posted on: 5/11 19:26
Transfer the post to other applications Transfer


Re: Are icotools available for AROS?

Joined:
2009/1/17 11:30
From Camogli GE Italy
Group:
Member
Posts: 145
Offline
@origami

sorry but I can't help you on such matter. Icons for me are just a small picture in the workbench and I use them in the other way around, I mean... whatever is the icon I need to convert it to an Hollywood brush (that at the end is a png picture).

Actually I'm in touch with miker for this conversion tool I need. Hopefully there should be a first prototype shortly.
Basically, because Hollywood can not extract the picture from and icon file, I need an external tool that converts them to an Hollywood readable format (I choose png).

So the tool (icontoiff under os4 and the new one under aros) will use simply a syntax like this in Hollywood

Execute(icontoiff_path$.." "..src$.." "..dest$ .." format=png >NIL:")

Where "execute" is the Hollywood command to run outer programs, others are my variables in where i store the full paths .. is the Hollywood command to concatenate strings

ciao

Posted on: 5/12 4:31
Transfer the post to other applications Transfer


Re: Are icotools available for AROS?

Joined:
2016/8/16 0:09
Group:
Member
Posts: 247
Offline
@ilbarbax:
Ok, thank you. In that case i stop developing my tool any further as it is already capable of converting .info to png.

Posted on: 5/12 12:21
Transfer the post to other applications Transfer


Re: Are icotools available for AROS?

Joined:
5/2 17:15
From California, United States
Group:
Member
Posts: 70
Offline
@origami,

Actually, I'd be interested in seeing how your program works. There are different approaches to the same task.


When you say "IFF" do you mean "PNG" or "IFF-ILBM"?
My Icon Editor for .NET can display 24bit PNG images on Windows. I'll post the program if you'd like. I intend to port it over to AROS in the near future as "PNG Icon Edit" for IFF and PNG. This is what it looks like currently. If you post a sample png image I can see if it will display.


https://www.dropbox.com/s/vpjfnodlkilr ... Edit_ILBM%205bpp.png?dl=0


My approach to reading a PNG icon (.info) file is fundamentally different. I don't use DataTypes or DiskObjects or such. In fact, I read the PNG chunk data directly. Because it is basic C code it could be compiled for AROS i386, AROS 68k, and even Amiga OS 68k. When compiled file size of the executable will be less than 30kb. I've been working on it for about a week now, but it will be done by this weekend. The techniques I developed with this program to read four letter chunk ID's and offsets can be used in at least two other programs: "Icon Info" and "Icon2IFF" for extracting 68k IFF-ILBM images.

So, this is how my version of "Icon2PNG" works. I read the PNG icon file starting at offset=1, reading 3 bytes to get fileID. If the fileID doesn't match 'PNG' the program aborts because it is not a valid PNG Icon File! If the fileID is valid we proceed. There are two main sub functions "listChunks" and "findChunk". After checking fileID we go to listChunks which will create an integer list of all offsets to all PNG chunks found in image1. The first item in the array must be 'IHDR' and the last 'IEND'. If fileID 'PNG' and chunks 'IHDR' and 'IEND' are present it's a valid PNG file that is embedded in another file (.info). The second function is findChunk which uses chunkList and chunkID to return an offset to a given four letter chunk such as 'IHDR'. Theoretically we could find an offset for any chunk in the file. Once we generate the chunkList we verify 'IHDR' and 'IEND' with findChunk. Once we have the offset to 'IEND' we calculate EOF. Then we can read from offset=0 to EOF for Image1 and write the new file (Im1.png). Reading image2 is easier. The EOF for image1 is the POB (point of beginning) for image2. So we find fileID. If 'PNG' read till EOF to get file size. Read bytes to write a new file (Im2.png). Process complete after writing images. It extracts "Im1.png" and "Im2.png" as images in the same color depth as the original PNG icon (.info) file.

The syntax for the program is: Icon2PNG [path + filename.info] [no. of images to extract, 1 or 2] [optional output path]. If no. of images is null it will extract both. If the optional output path is missing it will extract to current executable path for Icon2PNG file.

I'll post everything including source and sample icon and
the resulting png images as well as a screenshot for it. If nothing else it will be interesting to see how it works.

Posted on: 5/12 12:36
Transfer the post to other applications Transfer


Re: Are icotools available for AROS?

Joined:
5/2 17:15
From California, United States
Group:
Member
Posts: 70
Offline
@origami,

Here is the Icon Edit .NET version for Windows. It may be able to help to open and view your 24/32bit png images.

You can only open and save images using "Images" menu. It's a work in progress. It only saves 8bit images, but it should open 24 and 32 bit using the file filter at bottom of Open File Dialog. Have fun!

https://www.dropbox.com/s/ni694n6upugc ... Palette%20Loader.exe?dl=0

If you'd like to try it but can't download the file I can send a zip file by email instead.

Mike R.

Posted on: 5/12 13:13
Transfer the post to other applications Transfer


Re: Are icotools available for AROS?

Joined:
2016/8/16 0:09
Group:
Member
Posts: 247
Offline
Quote:

Actually, I'd be interested in seeing how your program works. There are different approaches to the same task.

No problem. I'll need to fix a bug, and clean up the sources before i'll commit to github.

Indeed, different approaches. I took the shortcuts as i wanted quick results. e.g. it buys me time to implement a platform independent solution as you are currently doing.

Quote:

When you say "IFF" do you mean "PNG" or "IFF-ILBM"?

I was refering to IFF-ILBM.

The 24 bit images works just fine, but the 32-bit ones (simply rgba, interleaved) makes everythng crash :-S

There are alternative approaches, but since IFF is only supported by a few programs i don't think it will make any sense to use even less familiar chunk(s).

The aim was to have my tool act similar as the original icontoiff program but not relying on datatypes. The only thing missing for that is the "32-bit IFF ILBMs" that is mentioned in the readme of icontoiff.

Quote:

If you post a sample png image I can see if it will display.

The PNG fileformat seems to work fine for me and there are a plethora of programs that are able to display/convert those images. Also in 32 bit format.

I just find it brutally awesome i am able to crash (and by that i meant: crash hard) programs like xnview and IrfanView

Quote:

My approach to reading a PNG icon (.info) file is fundamentally different. I don't use DataTypes or DiskObjects or such. In fact, I read the PNG chunk data directly. Because it is basic C code it could be compiled for AROS i386, AROS 68k, and even Amiga OS 68k.

For reading, i use api call GetDiskObjectNew(). AROS does the 'magic' there for me. I can't use datatypes to save.

Then i cast the loaded diskobject to NativeIcon, which isn't present by default for classic. So, in that regards my code isn't 'portable'.

It would not be hard to do the conversion manually (in fact, i still need to do that for classic icons) but takes time to do it right for all circumstances. In theory (but tested in practice) the IFF-ICON file and/or PNG could simpy be 'exported' to disk/memory, where the IFF-ICON requires a conversion to PNG.

The NativeIcon simply provides me with chunky or planar data in case present.

I "stuff" this data into a TFPCustomImage class, and use that to either save using TFPCustomImageWriter that is able to save png images or manually convert and/or write to IFF format file on disk (e.g. CustomImageWiter does not support iff)

Posted on: 5/12 13:56
Transfer the post to other applications Transfer


Re: Are icotools available for AROS?

Joined:
2016/8/16 0:09
Group:
Member
Posts: 247
Offline
kind of semi-official release (but not really) of my icontoiff interpretation named icon2iff (how .. ahum... original ).

32-bit rgba, IFF-ILBM output untested and unsupported and debug options/info are still present.

Small test-script with icons provided in archive. If i violated your intellectual property with providing these icons then please let me know.

Fixed bug in that png icons were previously saved as actual 48-bit images

edit:
With regards to bgra iff-ilbm output: i did not set alpha for any pixel, so should return a blank image.

Attach file:


zip icon2iff-01.zip Size: 553.88 KB; Hits: 15

Posted on: 5/13 4:52

Edited by origami on 2017/5/13 8:09:44
Transfer the post to other applications Transfer


Re: Are icotools available for AROS?

Joined:
5/2 17:15
From California, United States
Group:
Member
Posts: 70
Offline
@origami,

Thanks for the test files. I'll give them a try.

My program called "Icon2Png" (how original I know!) will be presented tomorrow evening as a working prototype. It currently extracts png images as expected.

If I can figure out how to post images and files on Aros-Exec without using DropBox I could post screenshots and an AROS i386 executable for you to test with sample icons.

http://aros-exec.org/home/arosexec/ar ... he/6991_591761964b4bc.png

http://aros-exec.org/home/arosexec/ar ... he/6991_59176247adb1e.png

http://aros-exec.org/home/arosexec/ar ... he/6991_591762fd94a6e.zip


Ok, now with DropBox:

https://www.dropbox.com/s/criqsrymg3xhsil/Icon2PNG.zip?dl=0

https://www.dropbox.com/s/c4fn6mh6ex1u855/Sceenshot_Test3.png?dl=0

https://www.dropbox.com/s/kyfkcwpay2iw ... creenshot_Second.png?dl=0



Posted on: 5/13 12:48
Transfer the post to other applications Transfer


Re: Are icotools available for AROS?

Joined:
2016/8/16 0:09
Group:
Member
Posts: 247
Offline
Quote:
miker wrote:
Thanks for the test files. I'll give them a try.

np, plenty more around on aminet.net

Quote:

My program called "Icon2Png" (how original I know!) will be presented tomorrow evening as a working prototype. It currently extracts png images as expected.

just for the record. no competition there. in case your code is platform independent, yours wins by miles.


Quote:

If I can figure out how to post images and files on Aros-Exec without using DropBox I could post screenshots and an AROS i386 executable for you to test with sample icons.

Attachments are a bit limited (in size), but when you reply to a post you should be able to see (from left-to-right, at bottom of your post-edit) a fat printed text "attach file", a editbox and two button, one named choose and another one named upload. choose, let you chose a file, and upload... well, i think you can imagine what that does

Once a file is attached correctly it will appear in a small list underneath your post. and you can select them to remove.

If your post is ok (pictures and attachment do not show in preview) then you can 'post' your message and the attachment(s) will appear.

Posted on: 5/13 12:55
Transfer the post to other applications Transfer



« 1 2 3 4 (5) 6 7 8 9 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4331
2 magorium
magorium
4095
3 phoenixkonsole
phoenixkonsole
3887
4 nikolaos
nikolaos
3677
5 deadwood
deadwood
2923
6 ncafferkey
ncafferkey
2599
7 mazze
mazze
2202
8 clusteruk
clusteruk
2065
9 Kalamatee
Kalamatee
2018
10 damocles
damocles
1789
© 2004-2017 AROS Exec