From owner-freebsd-questions@FreeBSD.ORG Wed Apr 1 09:02:27 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 161E9106566C for ; Wed, 1 Apr 2009 09:02:27 +0000 (UTC) (envelope-from bc979@lafn.org) Received: from zoom.lafn.org (zoom.lafn.org [206.117.18.8]) by mx1.freebsd.org (Postfix) with ESMTP id EE1FB8FC18 for ; Wed, 1 Apr 2009 09:02:26 +0000 (UTC) (envelope-from bc979@lafn.org) Received: from [10.0.1.2] (pool-71-109-162-173.lsanca.dsl-w.verizon.net [71.109.162.173]) (authenticated bits=0) by zoom.lafn.org (8.14.2/8.14.2) with ESMTP id n318g6J1039134 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 1 Apr 2009 01:42:06 -0700 (PDT) (envelope-from bc979@lafn.org) Message-Id: From: Doug Hardie To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Wed, 1 Apr 2009 01:42:05 -0700 X-Mailer: Apple Mail (2.930.3) X-Virus-Scanned: ClamAV version 0.92.1, clamav-milter version 0.92.1 on zoom.lafn.org X-Virus-Status: Clean Subject: Use of libgd X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2009 09:02:27 -0000 I am trying to use libgd to create some images. They are creating properly except there are color changes that I can't seem to figure out. The initial image is basically black and white PNG. I have converted it to GD2 format. There are a number of secondary images that have a couple of colors (black, red, blue etc). Each of them has been converted to GD2 format. When any of these are converted back to PNG format they display properly. However when I load the initial image, and then overlay it with one of the secondary images, the colors in the secondary images change. For example, red can become yellow or black etc. I tried gdImageCopyPalette from the secondary to the primary before the overlay but that seems to have no effect. Clearly I am missing something but can't seem to figure it out. Any ideas? Thanks.