CPCWiki forum

General Category => CPCWiki Discussion => Topic started by: TFM on 21:03, 14 December 15

Title: Upload of DSKs
Post by: TFM on 21:03, 14 December 15
Hi there!


IMHO it would be nice to be enabled to upload DSKs here. It's a pain to type in a message, then the system complains a file being a DSK, then one has to zip it and type in everything again.


DSKs are really small, especially compared to pictures, which are usually 10 times bigger.


What do you think?

Title: Re: Upload of DSKs
Post by: gerald on 21:12, 14 December 15
A dsk is about 180kb even if it's only containing a 2k file.
Zip it and you will :
   Save storage on forum HD
   Save bandwidth on server internet line.

If you want to save you retyping, just grab a post-it and write the following on it :
compress the DSK you shall

and stick it to your monitor  ;)
Title: Re: Upload of DSKs
Post by: TFM on 22:34, 14 December 15
I don't have time for that, if uploading is so much trouble, I will just not do so. Sorry.


And about anything else: People upload ridiculous big pictures all the time. Which would be ok, if it would be needed, but mostly they are not very sharp and could easily reduced to 10% of size/bandwith/forum HD/anything else.


10 DSKs are not using as much space as one usual picture here, think about that.
Title: Re: Upload of DSKs
Post by: AMSDOS on 00:18, 15 December 15
Doesn't seem to be much effort for me to just right click on the DSK file from the open file menu from your favourite emulator and select send to, then compress zip file.
Title: Re: Upload of DSKs
Post by: Audronic on 00:42, 15 December 15
@TFM (http://www.cpcwiki.eu/forum/index.php?action=profile;u=179)

If you send files Zipped (compressed) then if you uncompress them and you have NO ERRORS then you know that the file transferred OK
If you send them Uncompressed then you don't know if they have transferred OK.

Please Zip (Compress) Files

Just my 2 Bobs worth.

Seasons Greetings

Ray
Title: Re: Upload of DSKs
Post by: TFM on 18:49, 15 December 15
Good point Ray, still it suxx if I type in half a page of text to explain how to use a program and the interface here deletes it while giving a notice "no dsk pls". And sorry, I really got no time for that, it's just nasty.
Title: Re: Upload of DSKs
Post by: Gryzor on 19:47, 16 January 16
Zipping or (my personal favorite) RARing a file is so trivial that it shouldn't be considered an issue under any circumstance. As others have pointed out, it saves real space on the server. It doesn't save downloading time I think, because the server already compresses everything it sends over, but it saves on CPU cycles as well as a result.


Yes, people do upload big images for no good reasons, but unfortunately I can't do anything about it :(
Title: Re: Upload of DSKs
Post by: AMSDOS on 22:06, 16 January 16
Quote from: Gryzor on 19:47, 16 January 16
Yes, people do upload big images for no good reasons, but unfortunately I can't do anything about it :(


I guess there's no way of Filtering large images, so if they go over a certain size (say 100Kb), they have to wait for approval from admin before they permanently go onto the system?


Just a thought.
Title: Re: Upload of DSKs
Post by: Bryce on 22:24, 16 January 16
It's a difficult call. Sometimes if you are trying to show hardware to explain or help solve some hardware problem, you really need higher resolution or you loose exactly what you are trying to show. Screenshots should never be larger than they are actually are on a CPC. You don't gain anything.

Bryce.
Title: Re: Upload of DSKs
Post by: AMSDOS on 22:33, 16 January 16
Quote from: Bryce on 22:24, 16 January 16
It's a difficult call. Sometimes if you are trying to show hardware to explain or help solve some hardware problem, you really need higher resolution or you loose exactly what you are trying to show. Screenshots should never be larger than they are actually are on a CPC. You don't gain anything.

Bryce.


That's what I was thinking when I wrote my comments. Yes I agree you need detail resolution when dealing with Hardware Photos, and that should be approved. I just thought if it was something inappropriate it could be removed before it gets onto the Wiki.
Title: Re: Upload of DSKs
Post by: Gryzor on 10:39, 17 January 16
No, unfortunately there's no mod functionality when it comes to files. It either passes, or it doesn't. So I'd have to set a limit to image size, but as Bryce said there are valid reasons for big images to exist...
Title: Re: Upload of DSKs
Post by: PulkoMandy on 15:44, 17 January 16
Is there no way for the server to zip uploaded DSKs by itself? (when uploading, not when downloading). This way we wouldn't have to do it manually and it would still not waste server space?
Title: Re: Upload of DSKs
Post by: Gryzor on 17:16, 17 January 16
Unfortunately, no. I haven't seen a forum ever that does that, to tell you the truth, though it'd be a nice idea.
Title: Re: Upload of DSKs
Post by: TFM on 01:06, 18 January 16
Quote from: PulkoMandy on 15:44, 17 January 16
Is there no way for the server to zip uploaded DSKs by itself? (when uploading, not when downloading). This way we wouldn't have to do it manually and it would still not waste server space?


Great idea! Furthermore a DSK only wastes maximum less than 200 kb, but all these pictures people upload are wasting MBs of space. There's an clear imbalance against all logic. I clearly have not time to zip all dsk's. It's tedious! So I just put DSKs in Markus forum.  :)
Title: Re: Upload of DSKs
Post by: AMSDOS on 06:12, 18 January 16
Quote from: Gryzor on 10:39, 17 January 16
No, unfortunately there's no mod functionality when it comes to files. It either passes, or it doesn't. So I'd have to set a limit to image size, but as Bryce said there are valid reasons for big images to exist...


Understood, thanks.
Title: Re: Upload of DSKs
Post by: mr_lou on 07:15, 18 January 16
As for huge images of schematics, those can be considerably reduced in size too, by using the PNG format with only the number of colours actually used in the image.

Example:
http://www.cpcwiki.eu/imgs/2/2b/CPC2SCART_-_RGB.jpg (http://www.cpcwiki.eu/imgs/2/2b/CPC2SCART_-_RGB.jpg)
This JPG image is 52052 bytes. There's no reason at all to use the JPG format for illustrations like this.

PNG version of the same image with the same pixel-size is only 5968 bytes. That's only 12% of the JPG size.

If filesize is important, then there ought to be a rule that illustrations were done using the PNG format too.

Auto-zipping uploaded files should be possible too. If a mod isn't available, then someone from this forum ought to be able to create one, considering the amount of coders we have.
Title: Re: Upload of DSKs
Post by: Bryce on 09:32, 18 January 16
Schematics are never a problem, even the bigger ones a only a few kilobytes as long as they aren't scanned images from some manual. The problem is when you have pictures of a real PCB or the mechanics of a disk drive. These need resolution to show/see the issues.

Bryce.
Title: Re: Upload of DSKs
Post by: Gryzor on 15:09, 18 January 16
Bryce is correct - 'simple' images like schematics will be small in size even if their dimensions are huge. It's photos that are the problem. Well, in the event of exceptions as the above it means the jpg has been badly encoded, but how can I enforce PNGs?


@TFM (http://www.cpcwiki.eu/forum/index.php?action=profile;u=179) : the 'imbalance against all logic' is asking for something that is wrong just because there's something else that is wrong. And, it may seem a small thing to you, but 200KB times 1000 (easily) dsk or cartridge images meanes several hundreds of megabytes... and, as said before, it's so trivial to zip files, even in the Open dialog windows, that it's stupid that we're even discussing it being an issue; so by all means, post your unzipped dsk images wherever you feel like because frankly, I've spent enough time trying to clean up hundreds of unzipped files already.
Title: Re: Upload of DSKs
Post by: mr_lou on 15:34, 18 January 16
Well, I took a brief look.
I see the PNG format is indeed used, but wrongly. When an illustrations only uses 2 colours, there's no need to save it as a 24-bit image.

3 examples:
http://www.cpcwiki.eu/imgs/4/4a/CPC6128_Schematic.png (http://www.cpcwiki.eu/imgs/4/4a/CPC6128_Schematic.png) = 735.846 bytes that can be reduced to 126.344 bytes = 17%
http://www.cpcwiki.eu/imgs/0/0e/Kcc_schem1.png (http://www.cpcwiki.eu/imgs/0/0e/Kcc_schem1.png) = 263.716 bytes that can be reduced to 100.869 bytes = 38%
http://www.cpcwiki.eu/imgs/5/53/Kcc_schem4l.png (http://www.cpcwiki.eu/imgs/5/53/Kcc_schem4l.png) = 1.217.646 bytes that can be reduced to 197.235 bytes = 16%

Those things add up too.

It makes sense to use zip for DSK files of course. It just feels like there ought to be an equally amount of focus on the schematics illustrations.

Just my 2 cents.
Title: Re: Upload of DSKs
Post by: Gryzor on 11:35, 19 January 16
Very good point, though I can't, unfortunately, control what people upload in terms of images. About schematics: the depth you mention is of course the issue - for such images I'd guess even a gif would be enough and maybe make more sense?
Title: Re: Upload of DSKs
Post by: mr_lou on 13:04, 19 January 16
Quote from: Gryzor on 11:35, 19 January 16
Very good point, though I can't, unfortunately, control what people upload in terms of images. About schematics: the depth you mention is of course the issue - for such images I'd guess even a gif would be enough and maybe make more sense?

Yes, GIF can be used too, but won't take up a smaller filesize than an 8-bit PNG.
And, doesn't it still (officially) cost money to use GIF images?
But it's true that GIF and PNG are the only proper formats to use when it comes to illustrations like that.
I just think 8-bit PNG is the way to go.
Title: Re: Upload of DSKs
Post by: gerald on 13:52, 19 January 16
Quote from: mr_lou on 13:04, 19 January 16
I just think 8-bit PNG is the way to go.
Yes, or even less : PNG support 1/2/4/8 bit indexed color.
Title: Re: Upload of DSKs
Post by: TFM on 18:37, 19 January 16
Quote from: Bryce on 09:32, 18 January 16
Schematics are never a problem, even the bigger ones a only a few kilobytes as long as they aren't scanned images from some manual. The problem is when you have pictures of a real PCB or the mechanics of a disk drive. These need resolution to show/see the issues.

Bryce.


That's exactly right. If help is needed here (for example: Who to get this damn Ready signal into this weird drive?) a high resolution is needed. So a bunch of MBs needs to be used. Here if really could help to use a JPG with less quality to save lots of MB.


A DSK is very small compared to a picture, and will be used by many people, while a high-res-pic is only of interest for very few and only for a short time (until the problem is solved). So upping DSKs is good for lots and wasting space for high-res only helps few. Solutions? Sure: Enable DSK upload. Make super-big pics temporary (for a month maybe). If they are of general interest, one can put em into the wiki itself.  :)
Title: Re: Upload of DSKs
Post by: Gryzor on 19:21, 19 January 16
Oh sure, I'll just ask an employee, or maybe a junior temp to preside over temporary images, or resize them as needed.
Title: Re: Upload of DSKs
Post by: AMSDOS on 08:16, 20 January 16
Quote from: mr_lou on 13:04, 19 January 16
And, doesn't it still (officially) cost money to use GIF images?


There are free programs which let you produce GIF Images, though are you referring to the ownership CompuServe have on that Format?
Title: Re: Upload of DSKs
Post by: TFM on 18:43, 20 January 16
Quote from: Gryzor on 19:21, 19 January 16
Oh sure, I'll just ask an employee, or maybe a junior temp to preside over temporary images, or resize them as needed.

Or one lines of code, like

If DATE = one_month_old THEN goto DELETE

;D




But no, you just have to define an upper size limit for pictures. Or just make some file-type unusable like DSKs.

Title: Re: Upload of DSKs
Post by: Gryzor on 14:20, 21 January 16
Image file types can't be blocked because all are legitimate. Same goes with sizes (and we're going around in circles here)
Title: Re: Upload of DSKs
Post by: Zoe Robinson on 15:32, 21 January 16
You might be able to get the server to automatically Zip a DSK file on upload. That would surely sort out the problem?


PHP file upload and zip on upload - Stack Overflow (http://stackoverflow.com/questions/6298232/php-file-upload-and-zip-on-upload)
Title: Re: Upload of DSKs
Post by: Gryzor on 15:41, 22 January 16
Quote from: Zoe Robinson on 15:32, 21 January 16
You might be able to get the server to automatically Zip a DSK file on upload. That would surely sort out the problem?


PHP file upload and zip on upload - Stack Overflow (http://stackoverflow.com/questions/6298232/php-file-upload-and-zip-on-upload)


Unfortunately, it's not that simple. You have to accommodate SMF's peculiarities - hashing, temp and how it handles uploads and downloads. It could conceivably work, but I'm not going to mess with the forum's basic functionality. In the SMF forum they've been saying that a mod needs to be built for that. If someone is knowledgeable in SMF, I'm open to letting them try their hand.
Title: Re: Upload of DSKs
Post by: Zoe Robinson on 17:10, 22 January 16
I'm busy for the next week or so but after that I'll see what I can do.
Title: Re: Upload of DSKs
Post by: Gryzor on 20:20, 22 January 16
Aha! Interesting, thanks :)
Powered by SMFPacks Menu Editor Mod