English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. General (https://eab.abime.net/forumdisplay.php?f=37)
-   -   Raw images (https://eab.abime.net/showthread.php?t=61808)

VoltureX 12 November 2011 03:21

Raw images
 
Are there any painting programs that can read raw files? *.rw

I have tried ImageFX and DP5 with no luck.

Thanks

Volt.

pmc 12 November 2011 09:16

Raw graphics data is just that, the raw graphics data only.

No details about the height, width, depth or colourmap of the graphics is contained in the data so there is no way for a paint program to know what those should be.

jman 12 November 2011 11:35

As PMC noted, no program knows by itself image size and color depth of a RAW file, because they are a simple stream of bytes.

You should input these data into ImageFX upon opening the file (provided ImageFX supports opening RAW files - which I don't know). I use PicCon or ImageStudio for such a task.

How can you tell image size and resolution of a RAW file? Well, you can deduce them from the size of the file, provided some knowledge of the Amiga video modes, it's just some math involved.

If you hand the file, I can try :-)

pmc 12 November 2011 11:46

jman: that's true to some extent - you can certainly make guesses at the height, width and depth of an image from its size but you can't work it out for certain.

For example: is a raw file that is 20480 bytes two bitplanes worth of 256 40 bytes wide lines or is it one bitplane's worth of 256 80 bytes wide lines?

The answer is: you don't know without guessing. You could try at least making educated guesses by looking at the code that works with the data as well as looking at the data size and seeing if you can work out the dimensions from that though I suppose...

Retro1234 12 November 2011 14:09

You can use ArtPro or other tool to convert
If you look at project.Sprites some people are good at guessing

VoltureX 12 November 2011 20:33

Thanks a lot for you answers. So what I understand. You make an image in IFF fx. and then convert it to raw via PicCon.

Volt.

pmc 12 November 2011 20:37

Yeah, make your graphics file for example in DPaint or wherever and convert it with PicCon or Kefrens IFF Converter or any other IFF to raw converter and then you can include that raw data in your sources.

Lonewolf10 12 November 2011 22:50

... and to stop people ripping the raw data you can encrypt the data before including it in your program and include a small decrypt routine too. Though users of emulators can rip graphics quite easily, images larger than 1 screen are harder to rip.
The images (and text) in my upcoming demo are now encrypted (as of this week). If anyone is going to rip graphics from me (or anyone that created them for me) they will have to work for it! ;)


Regards,
Lonewolf10

korruptor 12 November 2011 23:30

I can sorta see that as being interesting to do, but is it really worth it? I can't see many people robbing Amiga graphics these days :D

Maybe that's just me :D

matthey 12 November 2011 23:45

I believe PPaint has a raw image saver...

http://aminet.net/biz/cloan/PPaint.lha

@Lonewolf10
Encrypting data is a waste of time unless you are just compressing it and calling it encrypted. You could spend days figuring out ways to protect your gfx data and there would be guys on here that could rip it in 1/2 hour easy. If you really want to "protect it" then don't make it a challenge. Make it available for anyone to use and no one will use it. That's the state of the Amiga :/.

pmc 12 November 2011 23:48

Quote:

Originally Posted by Lonewolf10
The images (and text) in my upcoming demo are now encrypted (as of this week). If anyone is going to rip graphics from me (or anyone that created them for me) they will have to work for it!

Why on earth bother doing that...?

You have to waste your time encrypting the data, waste your demo's raster time decrypting it and, assuming that your demo decrypts the data prior to using it, isn't it then sitting in memory decrypted ready to be ripped anyway?

And I totally agree with matthey - putting out a statement like: "all data is encrypted so you can't rip it" normally means that someone *will* rip it just to show that they can.

jman 13 November 2011 01:09

Quote:

Originally Posted by VoltureX (Post 785073)
Thanks a lot for you answers. So what I understand. You make an image in IFF fx. and then convert it to raw via PicCon.

Volt.

Yes, and don't forget to generate also a palette file. A palette file will be included in your source code (assuming you need a RAW image for programming purposes) and will give proper colours to the various bitplanes composing your image.

StingRay 13 November 2011 10:15

Quote:

Originally Posted by Lonewolf10 (Post 785095)
... and to stop people ripping the raw data you can encrypt the data before including it in your program and include a small decrypt routine too.

Especially for graphics this is rather pointless since you have to display them at some point. Now, what stops anyone using a freezer to rip your graphics then? There are ways to top freezers of course, but I hope you can catch my drift.

Quote:

Originally Posted by Lonewolf10 (Post 785095)
The images (and text) in my upcoming demo are now encrypted (as of this week). If anyone is going to rip graphics from me (or anyone that created them for me) they will have to work for it! ;)

Unless you have invented a very tricky encryption this won't be much work. It's a matter of "let me look at your decryption code and I'll decrypt your data in no time".


Quote:

Originally Posted by pmc (Post 785114)
And I totally agree with matthey - putting out a statement like: "all data is encrypted so you can't rip it" normally means that someone *will* rip it just to show that they can.

Exactly! :D

Thorham 13 November 2011 15:05

Encryption for an Amiga demo? What a waste of time. It's not as if your livelihood depends on it ;)

VoltureX 13 November 2011 15:20

Thanks for answering my question ;)

Yet another question.

How is the order of colors in an image. Will the first color in the paint program also be the first color when making a palette in ASM?


How do I make a custom sized image file in DP5? I need an image at resolution 320*70.
It seems I can only save files in standard resolutions or am I wrong there?

Volt.

Lonewolf10 14 November 2011 00:19

Quote:

Originally Posted by pmc (Post 785114)
Why on earth bother doing that...?

You have to waste your time encrypting the data, waste your demo's raster time decrypting it and, assuming that your demo decrypts the data prior to using it, isn't it then sitting in memory decrypted ready to be ripped anyway?

No time is wasted encrypting it - I found it to be a good learning experience. Decrypting it also wastes zero time if you are clever with when you decrypt it.


Quote:

Originally Posted by pmc (Post 785114)
And I totally agree with matthey - putting out a statement like: "all data is encrypted so you can't rip it" normally means that someone *will* rip it just to show that they can.

I never stated that all data was encrypted ;)


Quote:

Originally Posted by Stingray (Post 785157)
Unless you have invented a very tricky encryption this won't be much work. It's a matter of "let me look at your decryption code and I'll decrypt your data in no time".

Yeah, but they have to find that code first.

Quote:

Originally Posted by Stingray (Post 785157)
Especially for graphics this is rather pointless since you have to display them at some point. Now, what stops anyone using a freezer to rip your graphics then?

Nothing I guess, but it still requires some work from them - which would be harder for images larger than the screen, or when graphics are displayed over a background image.

So you've never made any demo's with encrypted music or images?


Regards,
Lonewolf10

prowler 14 November 2011 00:32

@Lonewolf10: If you feel more comfortable using encryption in your upcoming demo then, of course, that is your prerogative, but please don't let this escalate into a heated argument. The other coders here are only giving you their advice based on their experience.

Leffmann 14 November 2011 00:43

I guess you could argue the same about compressing your demos - that it's useless because everyone has large harddrives today, but everyone still does it.

I think it's a cool idea and exercise, and nothing to bash him about. Hope you come up with some clever way of encrypting your graphics.

pmc 14 November 2011 08:22

Quote:

Originally Posted by Lonewolf10
I found it to be a good learning experience.

That certainly is a worthwhile reason to do it. I'm not sure how worthwhile encryption is in itself as already stated but if your understanding has increased by trying it then all power to you. :)

Quote:

Originally Posted by Lonewolf10
Yeah, but they have to find that code first.

I'm betting Sting could most certainly find it... :D

Quote:

Originally Posted by prowler
@Lonewolf10: If you feel more comfortable using encryption in your upcoming demo then, of course, that is your prerogative, but please don't let this escalate into a heated argument. The other coders here are only giving you their advice based on their experience

I don't think any of us are arguing at all. Various of us have expressed an opinion and Lonewolf10 has expressed his own opinion. I think it's cool all round. People having different points of view leads to healthy discussion where we can all learn things. :)

Quote:

Originally Posted by Leffmann
I guess you could argue the same about compressing your demos - that it's useless because everyone has large harddrives today, but everyone still does it.

True, but:

1. Sometimes you need to get your demo in under 64Kb to enter the compo and

2. Decrunch colours are cool :D

StingRay 14 November 2011 08:50

Quote:

Originally Posted by VoltureX (Post 785187)
How is the order of colors in an image. Will the first color in the paint program also be the first color when making a palette in ASM?

If you use any of the various converters (PicCon, ArtPRO etc.) you don't have to worry about your palette order. It'll be the same as in your original picture.

Quote:

Originally Posted by VoltureX (Post 785187)
How do I make a custom sized image file in DP5? I need an image at resolution 320*70.
It seems I can only save files in standard resolutions or am I wrong there?

It's been a long time that I last used DPaint, anyway, I would just use a "normal" screen mode (320x256 in this case) and then cut a brush of 320x70 pixels. Any of the above mentioned converters can do that.


Quote:

Originally Posted by Lonewolf10 (Post 785351)
Decrypting it also wastes zero time if you are clever with when you decrypt it.

Since decrypting needs CPU instructions I highly doubt that it wastes "zero" time!


Quote:

Originally Posted by Lonewolf10 (Post 785351)
Yeah, but they have to find that code first.

Which is not very hard since you have to access the encrypted data in one way or another.


Quote:

Originally Posted by Lonewolf10 (Post 785351)
So you've never made any demo's with encrypted music or images?

I have. And so have many others. Most encryption schemes are incredibly simple to break thus I find it quite pointless these days.


Quote:

Originally Posted by Leffmann (Post 785355)
I think it's a cool idea and exercise, and nothing to bash him about.

I don't see any bashing here.


Quote:

Originally Posted by pmc (Post 785373)
I don't think any of us are arguing at all. Various of us have expressed an opinion and Lonewolf10 has expressed his own opinion. I think it's cool all round. People having different points of view leads to healthy discussion where we can all learn things. :)

Can nothing but agree! :) :great


All times are GMT +2. The time now is 05:32.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.05368 seconds with 11 queries