Tiff

Übersicht BlitzMax, BlitzMax NG Allgemein

Neue Antwort erstellen

 

Rys

Betreff: Tiff

BeitragFr, Apr 26, 2019 10:55
Antworten mit Zitat
Benutzer-Profile anzeigen
Hi, I'm older person and recently I started BlitzMax programming. I'm writing a program to help me with my work. My scanner gives me files in TIFF format.
I need to open it with program created in Max. I tried to find how to force Max to reed TIFF files, with no succes. For now I'm using irfanview but I got
loads of this files everyday. Any advice for me? Thanks.

DivineDominion

BeitragSa, Apr 27, 2019 1:09
Antworten mit Zitat
Benutzer-Profile anzeigen
This is probably going to be complicated, but you can use external modules to load TIFF files.

GDI+: https://social.msdn.microsoft....g-gif-tiff

SDL: https://www.libsdl.org/projects/SDL_image/

There's a bmax-ng module to interface with SDL. That should get you started. I have 0 experience working with that, though, so good luck figuring out the details Smile
christian.tietze@gmail.com - https://christiantietze.de
macOS
 

Rys

Betreff: Tiff

BeitragSo, Apr 28, 2019 14:33
Antworten mit Zitat
Benutzer-Profile anzeigen
I would ask for more information on this subject. I'm just starting.
 

#Reaper

Newsposter

BeitragMo, Apr 29, 2019 19:04
Antworten mit Zitat
Benutzer-Profile anzeigen
Hello there,

the freeimage.mod (part of the bah.mod scope) made by Brucey and wrapper for the Freeimage library (http://freeimage.sourceforge.net/) should/can do this:
https://github.com/maxmods/bah...eimage.mod

The library is also capable of RAW files for which I have used this mod several years ago. I hope my memories are right. Hope it still works well! Have fun!
AMD Athlon 64 3500+, ATI AX800 Pro/TD, 2048 MB DRR 400 von Infineon, ♥RIP♥ (2005 - Juli 2015 -> sic!)
Blitz3D, BlitzMax, MaxGUI, Monkey X; Win7

DAK

BeitragFr, Mai 03, 2019 15:00
Antworten mit Zitat
Benutzer-Profile anzeigen
It might be easier to use some command line tool (like e.g. imagemagick which is available on Windows, Linux and Mac OS) to convert the TIFF to something like PNG. You can call command line programs from BlitzMax using BlitzMax: [AUSKLAPPEN]
system_("imagemagick.exe")
Gewinner der 6. und der 68. BlitzCodeCompo
 

Rys

Betreff: Tiff

BeitragFr, Mai 03, 2019 20:45
Antworten mit Zitat
Benutzer-Profile anzeigen
1. Scan in shades of gray to tif
2. Irfanview - tif ---> png
3. Blitzmax - Thresholding png
4. Irfanview png ---> tif
5 Save tif


Want:
1. Scan in shades of gray to tif
2. BlitzMax - everything

Holzchopf

Meisterpacker

BeitragSa, Mai 04, 2019 9:49
Antworten mit Zitat
Benutzer-Profile anzeigen
Isn't there a possibility to open and dictate Irfanview via command line? Maybe this site helps. It could be possible to let BlitzMax call Irfanview and let that do the conversion. Or the other way round: I think Irfanview support batch processing, so maybe you can tell it to convert the file, pass it to your BlitzMax application and then convert it back
Erledige alles Schritt um Schritt - erledige alles. - Holzchopf
CC BYBinaryBorn - Yogurt ♫ (31.10.2018)
Im Kopf da knackt's und knistert's sturm - 's ist kein Gedanke, nur ein Wurm

DAK

BeitragMo, Mai 06, 2019 13:47
Antworten mit Zitat
Benutzer-Profile anzeigen
@Rys: I know what you want. But it might be a lot easier to just call the command line version of irfanview (or imagemagick) to convert it. So it would be like this:


1. Scan in shades of gray to tif
2. Run your Blitzmax program
2.1. Blitzmax calls Irfanview or Imagemagick to convert tif to png
2.2. Blitzmax runs whatever you want it to do with the png
2.3. Blitzmax calls Irfanview or Imagemagick to convert png back to tiff and saves that

That way, from the user's perspective, Blitzmax still does everything but instead of processing the tif using some library it processes it using a command line tool.
Gewinner der 6. und der 68. BlitzCodeCompo

Neue Antwort erstellen


Übersicht BlitzMax, BlitzMax NG Allgemein

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group