Started by HaydenRead, December 22, 2015, 08:20:18 PM
0 Members and 1 Guest are viewing this topic.
Quote from: captain crunch on December 22, 2015, 09:02:55 PMWill this add a second BMP reader?Could the BMP reader in simworld.cc profit from this or vice versa?
Quote from: prissi on December 22, 2015, 09:34:04 PMAlternatively, on windows there is the png reader/writer for screenshots, and Linux uses a lot of libpng. I am not sure BMP is a good format for tutorial images.In any case I would suggest to consolidate the BMP reader functions in simworld and this patch, so have only one.
Quote from: TurfIt on December 22, 2015, 10:08:45 PMlibpng is already a dependency for MakeObj. trunk/utils/dr_rdpng.cc
Quote from: Ters on December 23, 2015, 10:02:02 AMI think BMP is not worth bothering with. Even Microsoft is no longer using it prominently. I don't think I've seen a BMP in an img-tag since the 20th century. BMP is also not as straight forward a format as one might believe. It supports a variety of color formats and compressions, including JPEG and PNG. Unless we support all, some users will eventually try using something that isn't and get stumped. Simutrans has poor error reporting mechanisms beyond the log file, and I'm not sure documentation writers know how to activate and find the log file.
Quote from: HaydenRead on December 22, 2015, 08:20:18 PMBMP Compression Support: None, RLE8, BITFIELDSBMP Bits Per Pixel Support: 1, 4, 8, 16, 24, 32 (converts to the 16 bit format used by Simutrans on loading).
Quote from: HaydenRead on December 23, 2015, 08:22:01 PMI understand in regards to BMP, which is why I noted:My thoughts (if this code does get incorporated into the game) is to state that the <img src= > tag has support for PNG and limited support for BMP (noting the above limitations).
Quote from: HaydenRead on December 23, 2015, 08:22:01 PMIt would be nice if .jpg, .gif, .tif, .j2k and a host of other file formats could also be implemented, but PNG and limited BMP support seem to be the low hanging fruit for implementation.
Quote from: Ters on December 23, 2015, 11:09:31 PMI'd just drop mentioning the support for BMP, even if it is included. That keeps it simple. Writing functionality is one thing, but we also have to support it, that is keep it working and help people using it, for "all eternity".
Quote from: Ters on December 23, 2015, 11:09:31 PMFor consumers, there are only two image file formats relevant today: PNG and JPEG. JPEG might not be suitable for the kind of graphic Simutrans has. GIF only has support for animations going for it (which also requires support from img-tags), but only does up to 256 colors. TIFF is a monster, and support is rare outside image processing tools. TGA used to be a popular, easy to use file format, but support is equally rare.
Quote from: HaydenRead on December 24, 2015, 12:07:46 AMOne issue I have been thinking on is the search order, as noted it currently goes 'Scenario directory', 'pak directory', 'application directory'. As this allows a scenario to override any Pak or Application images, and Pak to override Application images. (Not that Pak's or the Application currently have any images to load).Does this seem the correct order to search, or would it be better to have it go the other way round 'Application', 'Pak', 'Scenario'.
Quote from: HaydenRead on December 25, 2015, 07:14:53 AMmakes the images inline
Quote from: Yona-TYT on July 16, 2016, 10:58:59 PMI wonder why this is not incorporated?
Quote from: Ters on July 16, 2016, 11:11:24 PMOr the weather outside might be more tempting than sitting in front of a computer, or so I hear.
Quote from: Dwachs on July 17, 2016, 03:40:41 PM@HaydenRead: could you please upload the patch somewhere else? Attachments seem to be broken for now.
Quote from: Dwachs on October 09, 2016, 04:11:46 PM@HaydenRead could you please adjust the coding style such that it matches the existing code (e.g. tabs for indentation).The struct flowtext_t::image_t just wraps an image-id - use image_id instead?
Quote from: prissi on September 10, 2016, 08:51:31 PMOk, I was 4 weeks on holiday and had just a jub interview in Japan.I had a short look: First using stdstream is not adviced, as it cannot fail with exceptions (because of the multithreading or SDL2 do not like exceptions much). Also it will fail on any non-intel system (ARM, Power Mac, Amiga). But then, some of the old code had the sample problem ...I can fix this but not today.
QuoteJust as a side note, is there a location that details 'standard coding style' for Simutrans?
QuoteSimutrans coding style didn't really get far on the last attempt...