The companion library of cSDL to import and manage images in various files formats (including PNG en JPG)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Sylvain PILLOT d6f15889f1 Update of README.md 1 month ago
SDL added support for JPEG images 5 months ago
cmake All verifications done with fxSDK 2.9.2 : OK 1 month ago
.gitignore updated all cmake configuration files 1 month ago
CMakeLists.txt added JPG file format that was still broken 1 month ago
IMG.c making giteapc compatibility 5 months ago
IMG_bmp.c rev 1.0 of the lib - now working 5 months ago
IMG_gif.c initial commit - not working 5 months ago
IMG_jpg.c added support for JPEG images 5 months ago
IMG_lbm.c initial commit - not working 5 months ago
IMG_pcx.c initial commit - not working 5 months ago
IMG_png.c initial commit - not working 5 months ago
IMG_pnm.c initial commit - not working 5 months ago
IMG_tga.c initial commit - not working 5 months ago
IMG_tif.c initial commit - not working 5 months ago
IMG_webp.c initial commit - not working 5 months ago
IMG_xcf.c initial commit - not working 5 months ago
IMG_xpm.c initial commit - not working 5 months ago
IMG_xv.c initial commit - not working 5 months ago
IMG_xxx.c initial commit - not working 5 months ago
README.md Update of README.md 1 month ago
giteapc.make updated all cmake configuration files 1 month ago

README.md

Simple DirectMedia Layer SDL sublibrary SDL_image 1.2.12 repository for CASIO fx-CG 10/20 (a.k.a. PRIZM) and fx-CG 50 (or Graph 90+E)

Need to have a fully working gcc toolchain for SH3/SH4 architecture, such as fxSDK

You can use the giteapc install Slyvtt/cSDL_image command to get an automatic install

Using in a program

With CMake

find_package(cSDL_image 1.2.12 REQUIRED)
target_link_libraries(<TARGET> PRIVATE cSDL_image::cSDL_image)

With make, the following steps are not automatically done, so please proceed with the following manipulations :

  • copy the library libcSDL_image.a into your SH3/SH4 compiler lib folder
  • copy all header files *.h in the include folder include/SDL of the SH3/SH4 compiler
  • link with -lcSDL_image

In the C/C++ sources #include <SDL/SDL_image.h>

Typical CMakeLists.txt

Below is the typical minimum CMakeLists.txt file to be used for a fxSDK project aiming at using the cSDL_image library :

cmake_minimum_required(VERSION 3.15)
project(MyAddin)

include(GenerateG3A)
include(Fxconv)
find_package(Gint 2.7.1 REQUIRED)
find_package(cJPEG 9.2 REQUIRED)
find_package(cZlib 1.2.5 REQUIRED)
find_package(cPNG 1.5.30 REQUIRED)
find_package(cSDL 1.2.15 REQUIRED)
find_package(cSDL_image 1.2.12 REQUIRED)

set(SOURCES
  src/main.c
  # ...
)
# Shared assets, fx-9860G-only assets and fx-CG-50-only assets
set(ASSETS
  # ...
)

set(ASSETS_cg
  assets-cg/example.png
  # ...
)

fxconv_declare_assets(${ASSETS} ${ASSETS_cg} WITH_METADATA)

add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -std=c11)
target_link_libraries(myaddin cSDL_image::cSDL_image cPNG::cPNG cZlib::cZlib cJPEG::cJPEG Gint::Gint)


if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
  generate_g3a(TARGET myaddin OUTPUT "SDLIm_App.g3a"
    NAME "SDLIm_App" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
endif()