Member Avatar

Hi Guys I have a program thats supposed to generate 9 random objects made from lines and then allow me to save the panel showing the state of all 9 objects. Currently all 9 objects are being generated and when i click save the panel is being saved to a png file. However it seems that the png file and the panel are in two different states. Ive attached pictures at the end. code for my current GUI where the save button is located: `import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.Random; import java.awt.image.BufferedImage; …

Member Avatar
0
17
Member Avatar

I'm creating multiple custom info windows using only one xml layout, all of the info inside the window will be put In programmatically. I am now trying to give the ImageView an image but when I do that for one marker all of the other markers ImageView images become the same, any idea why? final Bitmap bmp = BitmapFactory.decodeByteArray(data, 0,data.length); if(postc.getAuthor().getObjectId().equals(ParseUser.getCurrentUser().getObjectId())){ Marker oldMarker = mapMarkers.get(postc.getObjectId()); final MarkerOptions MarkerT = new MarkerOptions().snippet(postc.getTContent()); MarkerT.title(postc.getAuthor().getUsername()); MarkerT.position(new LatLng(postc.getLat(), postc.getLong())); MarkerT.icon(BitmapDescriptorFactory.fromBitmap(bmp)); final Marker markeri = map.addMarker(MarkerT); map.setInfoWindowAdapter(new InfoWindowAdapter(){ @Override public View getInfoContents(final Marker marker) { View v = getLayoutInflater().inflate(R.layout.custommarker, null); final LinearLayout ll = (LinearLayout)v.findViewById(R.id.ll); …

Member Avatar
0
22
Member Avatar

I have a site where the customer makes multiple selections of clothing and these are shown together at the end of the selection. So they may select a dress, top and skirt, accessory etc. All the images are in png format with a transparent background. At the end of the selection, the preview page shows these individual images layered using z-index. However, I want to send a thumbnail of a merged image of all these individual png files to a shopping cart. I have been trying to merge multiple images using php and send the merged file to a folder …

Member Avatar
0
15
Member Avatar

<? $connection = mysql_pconnect("***","***","***"); mysql_select_db("***"); $id = mysql_real_escape_string(strip_tags(stripslashes($_GET['id']))); $getUser = mysql_query("SELECT * FROM user WHERE id='".$id."'"); $gU = mysql_fetch_object($getUser); $Background = $gU->Background; if (empty($Background)) { $Background = ""; } $Hat = $gU->Hat; if (empty($Hat)) { $Hat = ""; } class StackImage { private $image; private $width; private $height; public function __construct($Path) { if(!isset($Path) || !file_exists($Path)) return; $this->image = imagecreatefrompng($Path); imagesavealpha($this->image, true); imagealphablending($this->image, true); $this->width = imagesx($this->image); $this->height = imagesy($this->image); } public function AddLayer($Path) { if(!isset($Path) || !file_exists($Path)) return; $new = imagecreatefrompng($Path); imagesavealpha($new, true); imagealphablending($new, true); imagecopy($this->image, $new, 0, 0, 0, 0, imagesx($new), imagesy($new)); } public function Output($type = "image/png") { …

Member Avatar
0
14
Member Avatar

Hi, I have a png image wihtout background and want this png to be my JFrame where the transparent section must be transparent; I have tried different ways I used the setOpaque(), setOpacity(), ImageIO but no clue. I want only my transparent png as JFrame. Any idea and solution will be appreciated.

Member Avatar
0
18
Member Avatar

Hi programmers, I am a c# programmer but I have a very big project in C++ (Which I am not familiar with) and I am facing a big problem. As part of the project, I need to convert the image (any image of any type bmp,jpeg,png...etc) to grayscale using openMP. After doing some research, I got the main method which allows me to do the conversion using openMP, it's as follows: // pDest is an unsigned char array of size width * height // pSrc is an unsigned char array of size width * height * 4 (32-bit) // To …

Member Avatar
0
32
Member Avatar

I want to add a new feature in my present image upload script and that is automatic compression of images just like TinyPng.Basically i want a code snippet that detect 24bit PNG file and convert it to 8bit png file with full support for transparency and that also strip any metadata present Any php based solution would do ,all i found till now use command line and i don't know how to implement these in php. I need a solution in php please Thanks for the guidance

Member Avatar
0
8
Member Avatar

![cap1](/attachments/large/3/cap1.png "cap1") Hi, I'm trying to build a simulation environment where male and female individuals move randomly in a map, which have one picturebox and one label each. My problem is, I can't seem to make them transparent (see the picture attached) Person.cs: this.label.BackColor = Color.Transparent this.picturebox.BackColor = Color.Transparent does not work. Also, the png images are transparent outside of the circles. How can I make the pictureboxes and labels completely transparent? Thanks for help!

Member Avatar
0
4
Member Avatar

Hello Guys , I want to create a script that convert a text file or Nfo file to an image(format is .PNG). What it does is simply load the txt and output it as an image Here is my code: <?php if(isset($_FILES['image'])){ $errors = array(); $allowed_ext = array('txt'); $file_name = $_FILES['image']['name']; $file_ext = strtolower(end(explode('.', $file_name))); $path = $_SERVER['DOCUMENT_ROOT'].'/fileupload'.'/images/'; if(in_array($file_ext, $allowed_ext) ===false){ $errors [] = 'Extension not allowed.'; } if ($file_ext =='txt') { $font_file = "C:/WINDOWS/Fonts/cour.ttf"; $nfo_file_lines = file($file_name); $width = 0; for($i = 0; $i < count($nfo_file_lines); $i++) { $box = imagettfbbox($file_size, 0, $font_file, $nfo_file_lines[$i]); $width = max($width, $box[2]); } …

Member Avatar
0
6
Member Avatar

This app I finally got the splashscreen to the way i want it, but when I run the .exe from the explorer the splashscreen loses its transparency and has a white background replacing the glow; In when the compiler runs it directly after it builds it look exactly how it should. I'm clueless as to why it looks the way it should in the compiler and different running from the explorer. Its a png image I'm using and the complier is QT creator; ![sceenshot1](/attachments/large/2/sceenshot1.jpg "sceenshot1") ![sceenshot2](/attachments/large/2/sceenshot2.jpg "sceenshot2")

0
1
Member Avatar

Hello guys, I've been working with webdesign for like 6 years and never seen something like this. I can't get my PNG image to be transparant! I've exported it on several settings in Photoshop but nothing seems to work. Does anyone has any idea on solving this? http://www.photoshop-leren.nl/ Thanks! Best, Saro

Member Avatar
0
2
Member Avatar

So, I want to save an HBITMAP to different image file formats like BMP,PNG and JPEG. I believe that the most simple way to do it is by using GDI+. So here is what I came up with. [CODE]Gdiplus::Bitmap bmp(hbmpImage,(HPALETTE)0); CLSID pngClsid; GetEncoderClsid(L"image/png", &pngClsid); bmp.Save(L"D:\image.png",&pngClsid,NULL);[/CODE] The problem is that it doesn't work, and I get a bunch of errors "error LNK2019: unresolved external symbol". I got [URL="http://msdn.microsoft.com/en-us/library/ms533843%28VS.85%29.aspx"]GetEncoderClsid()[/URL] function from MSDN, but I don't believe that this is the problem. Probably it's something else something I'm missing or something I don't know. I tried to do it the old way but …

Member Avatar
0
2
Member Avatar

hi, i am just wondering how to open a picture of a normal format. I know that you cant do it in the console. And i am using the compiler DEV-C++. Thanks

Member Avatar
0
7
Member Avatar

Hi there, I have a system where a user can upload an image, once an image has been uploaded php crops the image and then resizes to to a thumbnail. This works perfectly well with JPEGs, but does not work with PNGs and GIFs. I have used code to make sure the functions can deal with PNGs and GIFs but then the code runs all that is returned is an empty png or gif file and I do not know why. Here are my functions: Function to solely resize the image: [code=php] function createthumb($name, $filename, $new_w, $new_h) { $system = …

Member Avatar
0
4
Member Avatar

Hi , I have 2 images and one on button and another one as a label i want that when label image comes on button so it show the transparent part of image , i have made this code but in this the transparent part is hide . Here is my code [CODE] import fcntl, sys import sys import Skype4Py import functools import os import time from Tkinter import * import Image import ImageTk root = Tk() pic2a_dest = "pic2a.png" pic2a_open =Image.open(pic2a_dest) pic2a_handle = ImageTk.PhotoImage(pic2a_open) button1 = Button (root , image = pic2a_handle) button1.place(x=20,y=20) pic1a_dest = "pic1a.png" pic1a_open =Image.open(pic1a_dest) pic1a_handle …

Member Avatar
0
2
Member Avatar

Hello everyone, I'm working on a program that reads a PNG and extracts a custom chunk from it (using libpng). But now I've got problems to actually register my callback function to handle unknown chunks. According to the official documentation I have to declare which chunk is "unknown" (by their name) and I need to use [I]png_set_read_user_chunk_fn[/I] to register my callback. I've used a bit part of their code but it doesn't work, my callback isn't actually called and nothing happens except the width and heigh being printed. Here is an entire working code which reproduces the problem : [CODE=C]#include …

Member Avatar
0
9
Member Avatar

Hi, I need to develop a functionality similar with the iTunes one, when you right-click a song -> Get Artwork, the jpg/png is "embeded" into the mp3 file. I have no ideea how this could be done, do you have any hints ? Thanks.

Member Avatar
0
5
Member Avatar

I have this line added to my .htaccess which is suppose to make all .png files cacheable until end of the month. [CODE] <FilesMatch "\.(ico|flv|jpe?g|png|gif|js|css|swf)$"> ExpiresActive On ExpiresDefault "access plus 1 month" </FilesMatch> [/CODE] But when I run Google PageSpeed it still says that those images are not cacheable. What am I doing wrong here?

0
1

The End.