Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #1571 > unrolled thread

Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided

Started by"Bill Buckels" <bbuckels@mts.net>
First post2015-04-02 07:00 -0500
Last post2023-09-06 07:59 +0000
Articles 9 on this page of 29 — 9 participants

Back to article view | Back to comp.sys.apple2.programmer


Contents

  Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided "Bill Buckels" <bbuckels@mts.net> - 2015-04-02 07:00 -0500
    Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided Nicola <nvitacolonna@gmail.com> - 2015-04-02 18:25 +0300
      Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided "Bill Buckels" <bbuckels@mts.net> - 2015-04-02 20:20 -0500
        Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided "Bill Buckels" <bbuckels@mts.net> - 2015-04-02 22:04 -0500
          Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided Nicola <nvitacolonna@gmail.com> - 2015-04-03 09:18 +0300
          Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided Nicola <nvitacolonna@gmail.com> - 2015-04-03 09:56 +0300
            Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided Steve Nickolas <usotsuki@buric.co> - 2015-04-03 09:04 +0200
              Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided Nicola <nvitacolonna@gmail.com> - 2015-04-03 14:57 +0300
                Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided "Bill Buckels" <bbuckels@mts.net> - 2015-04-03 10:09 -0500
                  Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided Nicola <nvitacolonna@gmail.com> - 2015-04-03 18:42 +0300
                    Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided "Bill Buckels" <bbuckels@mts.net> - 2015-04-03 10:56 -0500
                      Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided "Bill Buckels" <bbuckels@mts.net> - 2015-04-03 22:23 -0500
                        Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided Nicola <nvitacolonna@gmail.com> - 2015-04-04 11:26 +0300
                          Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided "Bill Buckels" <bbuckels@mts.net> - 2015-04-04 06:45 -0500
                Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided mmphosis <mmphosis@macgui.com> - 2015-04-03 17:13 +0000
                  Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided "Bill Buckels" <bbuckels@mts.net> - 2015-04-03 12:38 -0500
                  Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided Nicola <nvitacolonna@gmail.com> - 2015-04-03 20:52 +0300
                    Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided "Bill Buckels" <bbuckels@mts.net> - 2015-04-03 13:11 -0500
      Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided mmphosis <mmphosis@macgui.com> - 2015-04-03 03:09 +0000
    Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided "Bill Buckels" <bbuckels@mts.net> - 2015-05-18 16:10 -0500
      Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided Chris Torrence <gorthmog@gmail.com> - 2017-02-18 10:48 -0800
        Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided Lifepillar <lifepillar@lifepillar.me> - 2017-02-18 21:53 +0100
          Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided Lifepillar <lifepillar@lifepillar.me> - 2017-02-18 22:07 +0100
            Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided "Bill Buckels" <bbuckels@mts.net> - 2017-02-20 15:51 -0600
        Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided "Bill Buckels" <bbuckels@mts.net> - 2017-02-28 04:16 -0600
    Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided Presley Acuna <presleyacuna@gmail.com> - 2023-09-04 05:07 -0700
      Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modes including Mode320 and Mode3200 SHR now provided David Schmidt <schmidtd@my-deja.com> - 2023-09-05 08:40 -0400
      Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modesincluding Mode320 and Mode3200 SHR now provided mmphosis <mmphosis@macgui.com> - 2023-09-05 23:01 +0000
        Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modesincluding Mode320 and Mode3200 SHR now provided Oliver Schmidt <ol.sc@web.de> - 2023-09-06 07:59 +0000

Page 2 of 2 — ← Prev page 1 [2]


#3278

FromChris Torrence <gorthmog@gmail.com>
Date2017-02-18 10:48 -0800
Message-ID<ab918149-ed75-4ce2-8568-d9efc2eefa73@googlegroups.com>
In reply to#1658
Resurrecting an old thread... For anyone looking to call b2d from Python...

First step was to build b2d on macOS (10.12.3) following nicola and mmphosis:
  gcc -DMINGW -arch i386 -Wno-pointer-sign -Wno-comment -o ../b2d b2d.c

The next crucial step is to resize your input images to be the correct size for HGR/DHGR etc. If you don't have the correct size then b2d will complain about "wrong format!".

Here, my Python code is reading an image from a URL (works just as well from a .jpg or .png file), resizing to be 280x192 (since I want HGR), saving it to a BMP, then calling b2d. Then I read in the bytes and do something with them.

from PIL import Image
import subprocess
img = Image.open(requests.get(url, stream=True).raw)
img = img.resize((280,192))
img.save('temp.bmp')
subprocess.check_call(['./b2d', 'temp.bmp', 'hgr'])
f = open("TEMPC.BIN", "rb")
data = f.read(8192)
f.close()

Hopefully this will help anyone else who is doing something similar.
Cheers,
Chris

[toc] | [prev] | [next] | [standalone]


#3279

FromLifepillar <lifepillar@lifepillar.me>
Date2017-02-18 21:53 +0100
Message-ID<o8ac7l$2hfh$1@adenine.netfront.net>
In reply to#3278
On 18/02/2017 19:48, Chris Torrence wrote:
> Resurrecting an old thread... For anyone looking to call b2d from Python...
>
> First step was to build b2d on macOS (10.12.3) following nicola and mmphosis:
>   gcc -DMINGW -arch i386 -Wno-pointer-sign -Wno-comment -o ../b2d b2d.c
>
> The next crucial step is to resize your input images to be the correct size for HGR/DHGR etc. If you don't have the correct size then b2d will complain about "wrong format!".
>
> Here, my Python code is reading an image from a URL (works just as well from a .jpg or .png file), resizing to be 280x192 (since I want HGR), saving it to a BMP, then calling b2d. Then I read in the bytes and do something with them.

Perhaps it is worth mentioning that you first need to install PIL and 
requests packages:

   pip install Pillow
   pip install requests

> from PIL import Image
> import subprocess

I also had to add:

   import requests
   url = 'https://some.url/to/some/image.png'

> img = Image.open(requests.get(url, stream=True).raw)
> img = img.resize((280,192))
> img.save('temp.bmp')
> subprocess.check_call(['./b2d', 'temp.bmp', 'hgr'])
> f = open("TEMPC.BIN", "rb")
> data = f.read(8192)
> f.close()

In my (limited) testing, b2d complains that temp.bmp does not have the
right format, although it looks fine if I open it with a graphics program:

   Palette 5: tohgr NTSC DHGR Colors
   Preview Palette 5: tohgr NTSC DHGR Colors
   temp.bmp is in the wrong format!

> Hopefully this will help anyone else who is doing something similar.

Sure, this comes in handy. Thanks for sharing!

Nicola

[toc] | [prev] | [next] | [standalone]


#3280

FromLifepillar <lifepillar@lifepillar.me>
Date2017-02-18 22:07 +0100
Message-ID<o8ad35$2k9a$1@adenine.netfront.net>
In reply to#3279
> In my (limited) testing, b2d complains that temp.bmp does not have the
> right format, although it looks fine if I open it with a graphics program:
>
>   Palette 5: tohgr NTSC DHGR Colors
>   Preview Palette 5: tohgr NTSC DHGR Colors
>   temp.bmp is in the wrong format!

It turns out that the problem was in the version of b2d installed from
https://github.com/lifepillar/homebrew-appleii, which was missing the
-arch i386 flag. I have fixed that and now it works!

If you have installed bmp2dhr using Homebrew, please reinstall it:

   brew update
   brew reinstall bmp2dhr

Nicola

[toc] | [prev] | [next] | [standalone]


#3281

From"Bill Buckels" <bbuckels@mts.net>
Date2017-02-20 15:51 -0600
Message-ID<o8fodf$ct7$1@gioia.aioe.org>
In reply to#3280
"Lifepillar" <lifepillar@lifepillar.me> wrote:
> I have fixed that and now it works!

Of course it works :) 

[toc] | [prev] | [next] | [standalone]


#3301

From"Bill Buckels" <bbuckels@mts.net>
Date2017-02-28 04:16 -0600
Message-ID<o93ilk$te7$1@gioia.aioe.org>
In reply to#3278
"Chris Torrence" wrote:
>Resurrecting an old thread...

Me too... try this one...

The "Mixed-Up Toy" and other "Incredible Toys" - An Apple II DHGR 
Programming Adventure for the C Language Programmer

http://www.appleoldies.ca/bmp2dhr/silly/




 

[toc] | [prev] | [next] | [standalone]


#6091

FromPresley Acuna <presleyacuna@gmail.com>
Date2023-09-04 05:07 -0700
Message-ID<2b626409-67d2-4c64-bc1a-73d4db82a231n@googlegroups.com>
In reply to#1571
On Thursday, April 2, 2015 at 8:00:56 AM UTC-4, Bill Buckels wrote:
> http://www.appleoldies.ca/bmp2dhr/heroes/ 
> 
> Bmp2DHR and A2FCBmp come together. I have updated the website with the 
> latest source code and Win32 binaries as of this morning. A2FCBmp is used to 
> make SHR images. People who use Linux or OSX will need to build their own 
> binaries. A gcc compatible makefile is provided. Visit the Bmp2DHR page 
> (link above) for the download link. Together these two converters provide 
> output for all the Apple II graphics modes including Mode320 and Mode3200 
> SHR. Mode640 SHR has not been added yet. 
> 
> Samples including recent SHR and BROOKS images have been recently posted to 
> the Apple II Enthusiasts FaceBook Group: 
> 
> https://www.facebook.com/groups/5251478676/ 
> 
> All the best, 
> 
> Bill Buckels

Hi all,

Looks like Bill's link to grab bmp2dhr for macos is a 404 these days.  Anyone have a link to a current site for the static binary?  

Thanks!

[toc] | [prev] | [next] | [standalone]


#6092

FromDavid Schmidt <schmidtd@my-deja.com>
Date2023-09-05 08:40 -0400
Message-ID<ud77jh$1vl68$1@dont-email.me>
In reply to#6091
On 9/4/23 8:07 AM, Presley Acuna wrote:
> On Thursday, April 2, 2015 at 8:00:56 AM UTC-4, Bill Buckels wrote:
>> http://www.appleoldies.ca/bmp2dhr/heroes/
>>
>> Bmp2DHR and A2FCBmp come together. I have updated the website with the
>> latest source code and Win32 binaries as of this morning. A2FCBmp is used to
>> make SHR images. People who use Linux or OSX will need to build their own
>> binaries. A gcc compatible makefile is provided. Visit the Bmp2DHR page
>> (link above) for the download link. Together these two converters provide
>> output for all the Apple II graphics modes including Mode320 and Mode3200
>> SHR. Mode640 SHR has not been added yet.
>>
>> Samples including recent SHR and BROOKS images have been recently posted to
>> the Apple II Enthusiasts FaceBook Group:
>>
>> https://www.facebook.com/groups/5251478676/
>>
>> All the best,
>>
>> Bill Buckels
> 
> Hi all,
> 
> Looks like Bill's link to grab bmp2dhr for macos is a 404 these days.  Anyone have a link to a current site for the static binary?
> 
> Thanks!

The Wayback machine is your friend.  But that page was mostly pointers 
to elsewhere anyway.  You might want to have a look at buckshot now:
https://apple2.gs/buckshot/

[toc] | [prev] | [next] | [standalone]


#6093 — Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modesincluding Mode320 and Mode3200 SHR now provided

Frommmphosis <mmphosis@macgui.com>
Date2023-09-05 23:01 +0000
SubjectRe: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modesincluding Mode320 and Mode3200 SHR now provided
Message-ID<mmphosis-1693954859@macgui.com>
In reply to#6091
Bring Up My Post (bump)

https://mmphosis.netlify.app/bmp2dhr/

[toc] | [prev] | [next] | [standalone]


#6094 — Re: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modesincluding Mode320 and Mode3200 SHR now provided

FromOliver Schmidt <ol.sc@web.de>
Date2023-09-06 07:59 +0000
SubjectRe: Update: Bmp2DHR and A2FCBmp - All Apple II Graphics Modesincluding Mode320 and Mode3200 SHR now provided
Message-ID<ud9bhg$ngd7$1@solani.org>
In reply to#6093
Hi,

It seems to me that this link too belongs in this thread:

https://github.com/digarok/b2d

Regards,
Oliver


[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.sys.apple2.programmer


csiph-web