From fredrik at pythonware.com Thu Nov 6 04:47:24 2003 From: fredrik at pythonware.com (Fredrik Lundh) Date: Thu Nov 6 04:47:35 2003 Subject: [Image-SIG] Re: PIL 1.1.4 and Python 2.3 on Mac OS X 10.3? References: <20031029072439.07E821BE55A@wolfe.parc.com> Message-ID: Bill Janssen wrote: > I've just upgraded my Mac to 10.3, and I'm trying to install PIL 1.1.4 > under /usr/bin/python, which is now 2.3. Build seems to go alright. > But no soap -- I keep getting the following error: > > % /usr/bin/python > Python 2.3 (#1, Sep 13 2003, 00:49:11) > [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import Image > Fatal Python error: Interpreter not initialized (version mismatch?) > Abort > % > > Anyone know the issue? Both the Python executable and the extension module (_imaging, in this case) are linked against the Python library DLL/SO [1]. When you run the interpreter, it's important that the system uses the same library instance for both the executable and the extension; if not, you get the above error message. Here's what happens: 1) the system loads the python executable 2) the python executable is dynamically linked against the Python library by the system's runtime loader [1] 3) the python executable hands control over to the Py_Main function in that library, which initializes the library and enters the command loop (or runs the script). 4) when you type the "import" command, code in the Python library locates and loads the _imaging module 5) the runtime loader links the _imaging module against the Python library, but this time, it picks up a *different* instance of the library. 6) the _imaging library calls a function in the Python library, which notices that it hasn't been properly initialized, and terminates. To fix this, look for bogus Python DLL/SOs on the system and Python path. If that doesn't help, it might be a linking problem; check with the Mac folks for details. 1) or whatever they're called on MacOS 10.3. From janssen at parc.com Thu Nov 6 18:57:34 2003 From: janssen at parc.com (Bill Janssen) Date: Thu Nov 6 18:57:51 2003 Subject: [Image-SIG] Re: PIL 1.1.4 and Python 2.3 on Mac OS X 10.3? In-Reply-To: Your message of "Thu, 06 Nov 2003 01:47:24 PST." Message-ID: <03Nov6.155735pst."58611"@synergy1.parc.xerox.com> > 2) the python executable is dynamically linked against the Python library > by the system's runtime loader [1] This seems to be complicated further in the Mac case, due to something I don't understand fully called "frameworks", which seem to interact with the runtime linking in some fashion. Guess I'm going to have to learn about it just to make Python work. Sigh. Thanks for the nice summary, Fredrik! Bill From bob at redivi.com Thu Nov 6 19:12:28 2003 From: bob at redivi.com (Bob Ippolito) Date: Thu Nov 6 19:12:49 2003 Subject: [Image-SIG] Re: PIL 1.1.4 and Python 2.3 on Mac OS X 10.3? In-Reply-To: <03Nov6.155735pst."58611"@synergy1.parc.xerox.com> References: <03Nov6.155735pst."58611"@synergy1.parc.xerox.com> Message-ID: <12E25D55-10B7-11D8-B3CD-000A95686CD8@redivi.com> On Nov 6, 2003, at 6:57 PM, Bill Janssen wrote: >> 2) the python executable is dynamically linked against the Python >> library >> by the system's runtime loader [1] > > This seems to be complicated further in the Mac case, due to something > I don't understand fully called "frameworks", which seem to interact > with the runtime linking in some fashion. Guess I'm going to have to > learn about it just to make Python work. Sigh. > > Thanks for the nice summary, Fredrik! The only way (that I can possibly think of) to cause this "Interpreter not initialized" problem for a module you built yourself is if you have more than one Python installed on your computer. The places to look for them, unless for some reason you've set DYLD_FALLBACK_FRAMEWORK_PATH yourself are: ~/Library/Frameworks/Python.framework /Library/Frameworks/Python.framework /Network/Library/Frameworks/Python.framework Delete all the other ones and stick with what Apple gave you and your problems should go away. You should stop making this so hard on yourself.. besides, PIL is available precompiled by way of Package Manager (albeit, missing libjpeg and a few other things, but I will have a Panther version of my Package Manager repository in a few days that will include a better version of PIL). -bob From janssen at parc.com Thu Nov 6 22:09:36 2003 From: janssen at parc.com (Bill Janssen) Date: Thu Nov 6 22:10:14 2003 Subject: [Image-SIG] Re: PIL 1.1.4 and Python 2.3 on Mac OS X 10.3? In-Reply-To: Your message of "Thu, 06 Nov 2003 16:12:28 PST." <12E25D55-10B7-11D8-B3CD-000A95686CD8@redivi.com> Message-ID: <03Nov6.190940pst."58611"@synergy1.parc.xerox.com> > Delete all the other ones and stick with what Apple gave you and your > problems should go away. > > You should stop making this so hard on yourself.. besides, PIL is > available precompiled by way of Package Manager (albeit, missing > libjpeg and a few other things, but I will have a Panther version of my > Package Manager repository in a few days that will include a better > version of PIL). Sorry, Bob, but I've been making it hard on myself for years now and probably can't stop now :-). In any case, we tend to use packages NFS-automounted from a central location, rather than installing packages like Python + PIL + ... on each individual machine. I need to make it continue to work that way (as it always has up to 10.3). Bill From fredrik at pythonware.com Sun Nov 9 16:02:53 2003 From: fredrik at pythonware.com (Fredrik Lundh) Date: Sun Nov 9 16:03:08 2003 Subject: [Image-SIG] Re: PIL anti-aliasing issue on Opteron with Suse 8.2 Linux References: <03Oct31.175637pst."58611"@synergy1.parc.xerox.com> Message-ID: Bill Janssen wrote: > I don't know whether this is a 64-bit issue, a little-endian issue (I > usually work on Suns or Macs), a gcc 3.3 issue, or just what. Any > ideas would be much appreciated. it works just fine on an Alpha, which is a little-endian 64-bit platform. to check if it might be a compiler bug, try compiling without optimization. From kbscamreporter at yahoo.com Mon Nov 10 15:49:38 2003 From: kbscamreporter at yahoo.com (kbscamreporter) Date: Mon Nov 10 16:55:47 2003 Subject: [Image-SIG] Strivectin Scam SD Strivectin-SD Zantrex Zantrex-3 Fraud Message-ID: <20031110204938.3262.qmail@plain.rackshack.net> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/image-sig/attachments/20031110/7bd0d68c/attachment.html From fredm at smartypantsco.com Tue Nov 11 21:04:15 2003 From: fredm at smartypantsco.com (Alfred Milgrom) Date: Tue Nov 11 21:04:28 2003 Subject: [Image-SIG] Palette problem with ImageGrab In-Reply-To: References: <03Oct31.175637pst."58611"@synergy1.parc.xerox.com> Message-ID: <5.1.0.14.0.20031112125544.03afce70@192.168.1.1> Hi: I am having a bit of trouble with the palette of images created using ImageGrab, and would be grateful if anyone can help. After using ImageGrab and setting the mode to 'P', the palette returned by im.palette is always the default (gradated) palette, rather than the palette of actual colours in the grabbed image. Everything else is fine, and I know that the program has the correct palette stored somewhere because when I save the image it saves it to file with the right colours. I have tried to flush out the correct palette by asking for a histogram, or by using im.palette.tostring(), but this does not work. In order for me to work with the correct palette I am having to save the grabbed image to file and then reload the saved image. This is obviously not the optimum way of doing things. Thanks in anticipation, Fred Milgrom From kleinbeckerscam at hotmail.com Wed Nov 12 10:29:27 2003 From: kleinbeckerscam at hotmail.com (kleinbeckerscam) Date: Wed Nov 12 10:31:23 2003 Subject: [Image-SIG] leptoprin scam zantrex scam strivectin scam anorex scam Message-ID: <20031112152927.26017.qmail@mach10.com> Klein Becker's 100 million dollar Strivectin and Supplement fraud Operation. (The below companies are the same or affiliated.) Basic Reasearch basicreasearch.org (.org should be a non-profit) Klein Becker kleinbecker.com ( there is no Klein or Becker) Zoller Laboratories Tree House Marketing (relationship ended badly) Zantrex-3 Silversage Covaxil Laboratories Sovage Dermalogic Laboratories Urban biologics Nutrasport Majestic Enterprises Alphagen Biotech XM International LLC Evanstown Research Labs Western Holdings, LLC Bydexbasic Reasearch Bydex Epregnancy magizine My Free Diet myfreediet.com Turley-Thompson (relationship ended badly) American phytothearopy research labs Nutrastar Body Innoventions bodyinnoventions.com Ag Waterhouse leptoprin.com (Waterhouse?? Hmmm) 2. The deception. (To make the companies and products sound like a Pharmaceutical company or product and then make wild, un-proven and illegal claims about the products abilities and affects. Then back the claims with fake, false, stolen, biased or non-existent studies) Three owners Dennis Gay, Evan Bybee, and Dr Dan Mowrey (Medical Doctor? Not) "Cashing in on Anorex leptin leptoprin (or leptospirosis, I can't decide which). Caught a glimpse of an infomercial the other day for a weight loss product that is trying to associate itself with leptin research the same way other quack products try to associate themselves with growth hormone: by using a cute sounding name. In this case, the name is Leptoprin. I suppose they might also be trying to associate themselves withleptospirosis (anybody into leptospirosis? Any vets in the group? Does it cause weight loss?). They have a web site at http://leptoprin.com/. I was somewhat amused at how they claimed in the infomercial that this product might be too powerful for the casual dieter (I guess if you're not a HYOOUUGE fat xxxx, you risk dissapearing in a puff of self-sustaining Malignant lipolysis). Even though it mentions the ingredients nowhere (a good hint is in the warnings section), how many here would like to wager that this is probably nothing more than a very plain (and rather overpriced) E.C.A. stack?" http://www.3fatchicks.com/leptoprin-ingredients-exposed.html "The only ingredient in Leptoprin that might assist in weight loss is calcium. If you do not get enough calcium in your diet, you can buy cheap supplements at any drugstore. You need to consume vitamin D at the same time, and magnesium is also recommended. The RDA for calcium is 1000 to 1300 mg per day. Leptoprin, when taking the maximum dosage of 6 capsules daily, provides 792mg of calcium, but no magnesium or vitamin D, and comes at a cost of $153.00 per month. You can purchase a calcium, magnesium, and vitamin D supplement from Vitacost. Two tablets contain 1000 mg calcium, 200IU Vitamin D, and 250mg magnesium. A 90 day supply would cost around $5.95. The remaining ingredients would be useless for weight loss or could be dangerous." Paula Begoun´s take on StriVectin-SD (from latest newsletter) >>> ( ) StriVectin-SD: Better than Botox? Quite a few of you have written asking about the rather prominent newspaper ads for the product StriVectin-SD ($135 for 6 ounces). With a headline that reads "Better than Botox," along with the increasing number of topical products hitting the market claiming they can mimic the effects of Botox without "painful injections," I certainly understand the curiosity. I wrote about StriVectin-SD in a previous newsletter, when a reader asked about its ability to repair stretch marks. That was StriVectin's original marketing claim to fame, though the fame was all self-promoted, as there is not a single independent, peer-reviewed study to prove that StriVectin is an effective option for repairing stretch marks. The studies that do exist about StriVectin's benefits for stretch marks were paid for by Klein-Becker, the company that distributes StriVectin. According to the company's latest ads, they were surprised to find that not only was StriVectin-SD getting rid of women's stretch marks, but also that somehow their facial wrinkles were going away, too. For that reason, we now have the astounding "anti-wrinkle breakthrough of the decade." Regrettably, no supportive research needs to be available to sell this kind of hyperbole. All it takes is to promise women that a product will get rid of their wrinkles and they will buy it in droves, no matter how many other product lines, infomercials, advertisements, or cosmetics salespeople pledge the exact same thing. StriVectin's ad continues with "The active formula in StriVectin-SD has recently been shown in clinical trials to significantly reduce that category of fine lines and facial wrinkles that can add 10–15 years to your appearance...and even reduce the dark circles under your eyes...without irritation, painful injections, or surgery." One more flourish is the statement that "in fact, [StriVectin-SD] is the only topical formulation clinically proven to effectively confront every aspect of wrinkle reduction." It is easy to debunk all of this overblown nonsense by pointing out the product's lack of sunscreen; perhaps StriVectin overlooked the research about sun exposure's deleterious, wrinkling, and discoloring effects on skin. Klein-Becker has parlayed these claims into what appears to be little more than an effort to spin off the popularity of Botox to its own benefit. StriVectin-SD is supposedly preferred because its long-term results versus the short-term results (and repeated treatments) of Botox. A Dr. Nathalie Chevreau is quoted in the ad, saying "the cumulative effects of using a product like StriVectin become more noticeable every day, and ultimately last longer than Botox." Chevreau is hardly an impartial source, as she works for Klein-Becker. Further, Dr. Chevreau is a licensed dietician in Utah, a fact that is conveniently left out of StriVectin's ad because it would conflict with her credibility as a medical doctor speaking about the legitimate benefits of an antiwrinkle cream. The final Botox comparison comes from the ad's statement that StriVectin not only addresses the _expression lines Botox treats, but also the lines Botox doesn't affect. However, the only lines Botox wouldn't affect are the ones not injected. Needless to say, Klein-Becker's statements comparing StriVectin-SD to Botox have not gone unnoticed by Allergan, the company that manufactures the drug. According to an article in The Salt Lake Tribune, Allergan has threatened to sue Klein-Becker for false advertising and unfair business practices. After the tension continued to mount on both sides, Klein-Becker actually went ahead and took the case to court, asking a federal judge to approve its advertising for StriVectin-SD. As this newsletter goes to press, Klein-Becker has not taken their lawsuit any further. In the meantime, the "Better than Botox" ads remain in wide circulation and are sent via spam emails, and StriVectin-SD is now available at Nordstrom department stores. So is StriVectin better than Botox? The short answer is no--and that means no way, and nohow. It isn't even better than the daily use of an effective sunscreen! StriVectin is merely a moisturizer with some good emollients and antioxidants, though the addition of peppermint oil is extremely suspect--the tingle is probably meant to lead women to believe that the product is doing something to their skin. Botox prevents the use of facial muscles, and that instantaneously smoothes out the skin. StriVectin-SD won't alter the wrinkling on any part of your face, not in the long term, and not in the short term. Incidentally, the two studies quoted in StriVectin's ads for "Better than Botox" were supposedly from information presented at the 20th World Congress of Dermatology, held in July 2002. These examined the effects of palmitoyl pentapeptide-3 (trade name: Matrixyl, but also known as Pal-KTTKS, which is the term used in StriVectin's ads) and compared it to vitamin C and retinol. However, there is no published research substantiating the results, and StriVectin declined to send us any documentation. Zantrex Zantrex-3 Zantrex 3 side effects are identical to those associated with excessive caffeine consumption (Zantrex is primarily marketed as a "proprietary xanthine-based stimulant", but xanthine is simply caffeine). You may be interested to know that one serving of Zantrex 3 will provide you with more caffeine than you'd obtain from 3 cups of coffee -- so caffeine-related side effects may be quite prominent in some people. It's also important to note that caffeine has many of the side-effects associated with ephedra (nervousness, increased blood pressure, heart palpitations, and so on) and although common in many foods (coffee, chocolate, various soft drinks, etc., etc.) may not be for everyone. It's also possible that because of its high caffeine content, you may experience withdrawal symptoms when you stop taking Zantrex 3. 3. The Fraud. They hire a slick marketing team (Mitchell k. Friedlander and Micheal Meade) Both already found guilty in two other states of the same type of fraud. http://www.usps.com/judicial/1985deci/19-104dd.htm http://www.usps.com/judicial/1985deci/19-103.htm http://www.law.emory.edu/11circuit/july95/94-8299.opa.html http://csmail.law.pace.edu/lawlib/legal/us-legal/judiciary/second-ircuit/test3/95-9159.opn.html 4. The Owners. Dennis Gay, Evan Bybee, and Dr Dan Mowrey have been so mean and nasty in their growth and greed it was not hard to find employees and ex-employees that were willing to talk. I have talked to at least ten and have a list of 30 more to follow up on in my next report.. So far it is all the same story,. The owners are "scumbags" and threaten to file suit against any employee or entity that comes near them. They have filed tons of lawsuits so they now have some teeth. Money will do that. Below is a small list of what employees and ex employees have said about the companies. 1b. Routine for them to change labels on a product instead of changing the product for sale or export. Thailand was the example.. 2b. Not paying employees agreed upon pay or bonuses. (Several have taken company to labor board.) 3b. Constant threats to employees for talking about the company’s shady business practices. 4b.Many allegations of tax evasion and hidden pay packages to management. Apparently also paying Mitch Friedlander in may "exotic" ways like paying his friends, Dog, Mother and paying for his unreported living expenses, Lexus ,penthouse apartment through APRL and paying him as a consultant even after more than four years. 5b. Selling products under false or with misleading representations and wild and false marketing practices. (Example is Strivectin stretch mark cream the is now a miracle wrinkle cream. 6b. Firing anyone who knows too much or ask questions about finance dept practices. 7b. Firing employees after the employee discover illegal workers in the company and then keeping the illegal workers. 6b. Dennis Gay Family members working at the company are out of control and unbearable to work with. 7b.Company owners talking about how devious they are and what they can do to screw with people in front of employees. 8b. Using other companies names like Nordstroms to lend themselves credibility in the market place and example is placing the Nordstroms name on http://www.basicresearch.org 9b. Systematic effort to hide their identities through holding companies or secret domain registrars. (Domains by Proxy http://www.domainsbyproxy.com/ ) and others. 10b. False or broken promises of company stock to employees and potential partners and even cousins of Dennis Gay. 11b. Un-paid vendors or terms stretched to the point of settlement. 12b. Price fixing, Threats and actions against any distributors who do not sell products at the set price. best example is Strivectin at 135 dollars. 13b. Employees leaving the company solely for ethical reasons 14b. Accusations of Evan Bybee entering into the offices of Tree house marketing group after hours and after they ended their marketing relationship. 15b. Boiler room sales tactics. about 100 of the employees at the family of fraud companies are telemarketers. 16b. Current investigations by the FDA FTC IRS and The Committee on Energy and Commerce and the Attorney Generals office. Below is an exact statement from a former employee. http://www.ripoffreport.com/report54520.htm "There are countless companies who have worked with Basic Research that have NEVER been paid. I cannot say enough about this company. Basic Research has been ripping people off for over 10 years. As a former employee, I know!!! The are wiley and sue everyone they come in contact with. I will never do business with them again. they claim to have a good reputation in the industry. Like Hell. The people who know, know these guys are scum. Especially the owners Dennis Gay, Evan Bybee and Dr. Morey. There are very few manufacturers and individuals they have not ripped off. No matter what you hear about this company if it is good, DO NOT BELIeVE IT. Maybe you could ask them to tell you how they pay Mitch. He is their director of marketing and just happens to be a convicted felon. No wonder they pay his dog and his wife to hide from the IRS. There are hundreds if not thousands of individuals who would like to see this company go down by the throat. I hear they are in Bankruptcy anyway and will probably go to Jail for Tax Evasion. There are countless companies who have worked with Basic Research that have NEVER been paid, and we are talking about 100's of thousands of dollars here. They rip you off and then say "go ahead and sue us" well I hope someone does. Get this, In GNC there is a sign in the back room from Basic Research that says "if anyone returns one of their products to get their name address copy of the drivers license and social security number and so Basic Research can sue you." Yes they sue customers who return their products. What a joke of a company. Class act these guys are. If I were you I would run like hell if you see their name on a product. Because they do not work and if you return it, they will sue you. And they act under many different names because they hide what they do. Please research this company and take them down! You will make 10,000 people happier than you could ever imagine." http://www.drugintel.com/news/a30403/commerce_energy_committee.htm http://www.badbusinessbureau.com/reports/ripoff69292.htm http://www.ripoffreport.com/results.asp?submit22=Search+All+The+Latest+Rip-Off+Reports+Now%21&q1=ALL&q2=&q3=&q4=&q5=treehouse&q6=&q7=&searchtype=0 http://csmail.law.pace.edu/lawlib/legal/us-legal/judiciary/second-circuit/test3/95-9159.opn.html http://www.usps.com/judicial/1985deci/19-104dd.htm Postal Fraud http://www.usps.com/judicial/1985deci/19-103.htm Postal Fraud http://www.law.emory.edu/11circuit/july95/94-8299.opa.html http://www.ultimatefatburner.com/zantrex-3-side-effects.html http://www.drugintel.com/drugs/zotrin.htm http://www.painstudy.com/PainDrugs/p35.htm#7 http://www.finanznachrichten.de/nachrichten/artikel-2336499.asp http://energycommerce.house.gov/108/Letters/03252003_859.htm http://www.ripoffreport.com/reports/ripoff67923.htm http://www.ripoffreport.com/reports/ripoff67930.htm http://www.ripoffreport.com/reports/ripoff53239.htm http://www.ripoffreport.com/report70249.htm http://www.ripoffreport.com/report70573.htm http://www.ripoffreport.com/report30978.htm http://www.ripoffreport.com/report29294.htm http://utahscams.50megs.com/ http://www.ripoffreport.com/reports/ripoff54426.htm http://www.sinuswars.com/newsletters/tinnitus1.asp Basic research http://www.ripoffreport.com/report54525.htm http://www.ripoffreport.com/report54520.htm http://www.striae.com/forum/topic.asp?TOPIC_ID=82 http://energycommerce.house.gov/108/Letters/03252003_859.htm http://utahscams.50megs.com/ MITCHELL K. FRIEDLANDER http://csmail.law.pace.edu/lawlib/legal/us-legal/judiciary/second-circuit/test3/95-9159.opn.html http://www.usps.com/judicial/1985deci/19-104dd.htm Postal Fraud http://www.usps.com/judicial/1985deci/19-103.htm Postal Fraud http://www.law.emory.edu/11circuit/july95/94-8299.opa.html Basic Research 5742 West Harold Gatty Drive Salt Lake City, Utah 84116 801-517-7000 phone 801-517-7001 fax Mamrälin-ARa StriVectin-SD Dermalin-APg Pedialean Thyrovarin Oxydrene TestroGel Biomodels Megatropin Ripping Gel TestPro-Alpha ECA Stack Patented ECA Stack 120ct Oxydrene Mamralin Luprinol - Klein Becker Testrogel Aprinol Anorex Anorex SF Ripping Gel Oxy Poppers RelaCore Carbolean Thryrovarin Somnabol Cutting Gel DynaKor - KynoVar Breast Augmentation Serum Nitrovarin Breast Augmentation Maintenance Tummy Flatttening Gel Quickstart Lip Plumper - Sovage Testroxin Lip Explosion Zotrin Men's Formula Quick Start For Men IsoCrystalin Strivectin Trivestin Zantrex Zoller Labs Instant Cellulite Eraser Zotrin Women's Formula Bust Booster - Body Innoventions ThyroStart 6. The End of chapter 2 P.S Please post and publish this report on as many web pages, message boards and news groups as possible so the truth does not get suppressed. Thank You kbstrongarm@yahoo.com From kleinbeckerscam at hotmail.com Wed Nov 12 17:05:17 2003 From: kleinbeckerscam at hotmail.com (kleinbeckerscam) Date: Wed Nov 12 17:08:57 2003 Subject: [Image-SIG] Klein Becker now under federal investigation Message-ID: <20031112220517.25044.qmail@mach10.com> Congressional Committee on Energy and Commerce comes out swinging against Diet Drugs targeted to Children, FDA Loopholes used to market Illegal Steroids STRAFFORD [drugINTEL] - 3 Apr 2003 - The Committee on Energy and Commerce showed no signs of political stupor or regulatory catharsis as it stepped up to take on some of the endemic problems that FTC and FDA have been helpless to deal with. Targeting nutraceuticals touted as Diet Drugs, the Committee on Energy and Commerce has demanded documentation of ingredients and clinical demonstration of safety and efficacy that vendors breezily contend is overwhelming but is never cited. Members of the Committee on Energy and Commerce requested FDA Commissioner Mark McClellan and the Drug Enforcement Agency to investigate and close loopholes allowing banned steroids to get on the market without needing to obtain FDA approval. Steroid precursors and pro-drugs that will form testosterone-related Illegal Steroids in the body are being sold by companies that were not named in the letters for obvious reasons. Skinny Pill flouts Congressional Committee on Energy and Commerce Requests Skinny Pill (see Website) is a name of a company (possibly identical to the Fountain of Youth Group LLC) in Ponte Vedra Beach, Florida, whose president is Edita Kaye. This pill contains a number of mostly diuretic herbal components including Uva ursi, juniper berry, and buchu leaf. Uva ursi is contraindicated in the PDR for children under 12. All cause the body to lose water. Dr. Alison Hoppin, chief of the pediatric obesity clinic at Massachusetts General Hospital, said "Diuretics in children can cause kidney problems and electrolyte imbalances if taken long term." Diuretics are likely to show an artefactual weight loss due to decrease in the amount of water in the body, thus showing immediate changes on the bathroom scale. "It's absolutely outrageous; "It's not going to help people lose weight. It's junk science," added Keith Ayoob, a pediatric nutritionist and an American Dietetic Association spokesman. Daniel Mowrey, affiliated with competitor Klein-Becker (possibly identical to Basic Research, both of Provo, Utah - a question Congress wants clarified) makers/distributors of diet drug Anorex (See drugINTEL News 27 Jan 2003) states "On her website Kaye claims that her 'Skinny Pill for Kids' is a 'safe, effective weight loss formula for children ages 6 -12'. However, a review of the National Institutes of Health (NIH) / National Library of Medicine database (PubMed) reveals not one single published clinical trial that has been conducted with anything called the 'Skinny Pill for Kids' or the combination and amount of active ingredients that make up the formula related to weight loss in children ages 6 to 12." Klein-Becker receives Congressional Request to put cards on the table The Klein-Becker / Basic Research criticism is apparently a case of the kettle calling the pot black, perhaps because of its competing product, PediaLean, containing an unidentified product "Pediatropin" derived from the P. rivieri root - all shrouded in mystery and scientific-sounding hype. A letter from the Committee on Energy and Commerce points out the deceptive nature of PediaLean advertising and notes the lack of safety or efficacy data. We found no genus to correlate with "P." rivieri, but the plant in question may be Amorphophallus rivieri also known as Konjac Root. One of the supporters of PediaLean is Nathalie Chevreau, member of the Scientific Advisory Board of Supplement Watch. Opinion: Caution is necessary in weighing the endorsements of "Supplement Watch". A random sampling of the reviews on Nutraceuticals revealed that some valid criticisms were given where appropriate, although it is far from rigorous or comprehensive - for instance, the very important induction of cytochrome oxidases by St. John's wort is not noted, and warnings concerning Ripped Fuel and Ephedra are understated. Despite the HON affiliation, source literature is rarely cited. At least one member of Supplement Watch is listed with a university affiliation, but it turns out that he was only a postdoctoral student at the university. Many of the members do not hold doctorates. Supplement Watch is "internally financed". You can make a complaint to the FDA regarding Supplements at the link below http://www.fda.gov/oc/buyonline/buyonlineform.htm From fredrik at pythonware.com Sat Nov 15 10:02:38 2003 From: fredrik at pythonware.com (Fredrik Lundh) Date: Sat Nov 15 10:02:58 2003 Subject: [Image-SIG] Re: Palette problem with ImageGrab References: <03Oct31.175637pst."58611"@synergy1.parc.xerox.com> <5.1.0.14.0.20031112125544.03afce70@192.168.1.1> Message-ID: Alfred Milgrom wrote: > I am having a bit of trouble with the palette of images created using > ImageGrab, and would be grateful if anyone can help. > > After using ImageGrab and setting the mode to 'P', the palette returned by > im.palette is always the default (gradated) palette, rather than the > palette of actual colours in the grabbed image. "setting the mode to 'P'" sounds a bit scary; the "mode" attribute shouldn't be modified. (to convert between different modes, use the "convert" method). can you perhaps post some code? From fredm at smartypantsco.com Sun Nov 16 19:23:01 2003 From: fredm at smartypantsco.com (Alfred Milgrom) Date: Sun Nov 16 19:22:38 2003 Subject: [Image-SIG] Re: Palette problem with ImageGrab In-Reply-To: References: <03Oct31.175637pst."58611"@synergy1.parc.xerox.com> <5.1.0.14.0.20031112125544.03afce70@192.168.1.1> Message-ID: <5.1.0.14.0.20031117104032.038f6a10@192.168.1.1> Hi: Thank you for offering to look at my problem. >"setting the mode to 'P'" sounds a bit scary; the "mode" attribute >shouldn't be modified. (to convert between different modes, use >the "convert" method). Apologies for not being accurate in my language :( I meant that I set the mode to 'P' by using the convert method. >can you perhaps post some code? Please find my sample code at the bottom of this post. The output of this test program on my machine is as follows: Information from grabbed image: There are 6 colours in this image Grabbed palette is: 0 1 2 3 4 5 9 a b 75 76 77 87 88 89 f4 f5 f6 Information from saved image: There are 6 colours in this image Grabbed palette is: 0 0 0 1 1 1 3 3 3 ff cc 0 ff ff 0 fc fc fc You will see that the image grabbed has 6 colours, but when I look at the palette information I get the 'gradated colours' palette: (0,1,2), (3,4,5), ... (f4, f5, f6) But after I save the image and load it back in, I get the correct colours (somewhat black, stippled yellow and somewhat white :) So the original grabbed image has the correct palette information in it somewhere. My question is: Am I doing something wrong? How can I get the palette information without having to save and reload the image? Thanks in advance, Fred Milgrom ---------------------------------------------------------------------------------------------------------- # Test of colour palette returned from ImageGrab from Tkinter import * import ImageGrab import Image import os class GUI (Frame): top = Tk() def __init__(self, parent=top): Frame.__init__(self,parent) self.master.title('Grab Test') self.Board = Canvas(self, width=200 , height=200 , bg="#FFF000") self.Board.pack(side=TOP, padx=10, pady=10) fButtons = Frame(self) self.bGrab = Button(fButtons, width=15, text="Grab", command=self.grabBoard) self.bGrab.pack(side=LEFT, anchor=W, padx=10, pady=2) self.bQuit = Button(fButtons, width=15, text="Quit", command=self.top.destroy) self.bQuit.pack(side=LEFT, anchor=W, padx=10, pady=2) fButtons.pack(side=BOTTOM, fill=X) self.pack() self.Board.create_rectangle(70, 70, 90, 90, fill='white') def colourinfo(self, im): hist = im.histogram() palette = im.palette for item in hist: coloursUsed = [i for i in range(len(hist)) if hist[i]] palettestring = palette.tostring() paletteUsed = [palettestring[3*i:3*i+3] for i in coloursUsed] print "There are %s colours in this image" %len(coloursUsed) print "Grabbed palette is:" for item in paletteUsed: for char in item: print '%x' %ord(char), print def grabBoard(self): x0 = self.Board.winfo_rootx()+2 y0 = self.Board.winfo_rooty()+2 x1 = x0 + 100 y1 = y0 + 100 im = ImageGrab.grab((x0, y0, x1, y1)) im = im.convert('P') print "Information from grabbed image:" self.colourinfo(im) path = os.getcwd() im.save(os.path.join(path, 'mytest.gif')) im = Image.open(os.path.join(path, 'mytest.gif')) print "Information from saved image:" self.colourinfo(im) if __name__ == "__main__": board = GUI() From s_t_a_n_i at yahoo.com Mon Nov 17 06:36:17 2003 From: s_t_a_n_i at yahoo.com (www.stani.be) Date: Mon Nov 17 06:36:22 2003 Subject: [Image-SIG] Saving tiff files In-Reply-To: <012401c39c54$2d6fe680$2c0aa8c0@duallie> Message-ID: <20031117113617.95684.qmail@web21101.mail.yahoo.com> Hi, Is it possible to: 1. save a tiff file with lzw compression from pil 2. save the dpi in the image file Thanks, Stani __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree From fredrik at pythonware.com Mon Nov 17 14:10:32 2003 From: fredrik at pythonware.com (Fredrik Lundh) Date: Mon Nov 17 14:32:55 2003 Subject: [Image-SIG] Re: Saving tiff files References: <012401c39c54$2d6fe680$2c0aa8c0@duallie> <20031117113617.95684.qmail@web21101.mail.yahoo.com> Message-ID: www.stani.be wrote: > 1. save a tiff file with lzw compression from pil nope; LZW is patented technology, and any use of LZW requires a license from Unisys (the patent may have expired in some locations, but that doesn't change the fact that Unisys is run by complete morons; don't use their technology if you can avoid it). > 2. save the dpi in the image file something like this should work: im.save("myfile.tif", resolution=200) From njohnson at natural-selection.com Mon Nov 17 20:28:32 2003 From: njohnson at natural-selection.com (Nathan Johnson) Date: Mon Nov 17 20:28:39 2003 Subject: [Image-SIG] BitmapImage instanciation of an xbm Message-ID: When I try to open an xbm image either from file or embedded in python code(as shown below) the PIL says it can't identify the image file. It seems like the BitmapImage class should be able to recognize the standard xbm format. The reason I'm using the PIL to open the xbm is because I need to resize the image. If anybody knows a better way of opening a .xbm file and being able to resize it, I'm open to suggestions. I'm running Python 2.3.2 with PIL 1.1.4 on Linux Thanks, Nate --------------------------------------------------------------- #!/usr/bin/env python from ImageTk import BitmapImage BITMAP = """ #define basic_width 32 #define basic_height 32 static char basic_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x40, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x02, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; """ icon = BitmapImage(data=BITMAP) --------------------------------------------------------------- Traceback (most recent call last): File "exp.py", line 28, in ? icon = BitmapImage(data=BITMAP) File "/usr/lib/python2.3/site-packages/PIL/ImageTk.py", line 219, in __init__ image = Image.open(StringIO(kw["data"])) File "/usr/lib/python2.3/site-packages/PIL/Image.py", line 1571, in open raise IOError("cannot identify image file") IOError: cannot identify image file Exception exceptions.AttributeError: "BitmapImage instance has no attribute '_BitmapImage__photo'" in > ignored From cbass233 at yahoo.com Tue Nov 18 14:07:45 2003 From: cbass233 at yahoo.com (Chuck Bass) Date: Tue Nov 18 14:07:58 2003 Subject: [Image-SIG] Plotting many point's with PIL In-Reply-To: Message-ID: <20031118190745.87074.qmail@web13906.mail.yahoo.com> I'm using Numarray and PIL with good results. My data has 10's of 10000's of points so efficiency is important (60seconds of plot time is not acceptable for this app). I've found that PIL was not really designed to support very large data sets (though it is the best out there). I can plot 2D numarray data directly using something like   draw.point(data.flat,fill)   I've found that I must flatten to get the numarray data to plot.  This is MUCH faster than having python loop through the data.   However I need to draw each point with a different color to represent errors.  Doing this requires me to loop through the points:   for point,color in zip(points,colors):   draw.point(point,color) This is slow. So the question is how big of a task would it be to make the PIL support a sequence of fill colors? To make it compatible with current code it would be nice to be able to say: draw.point(data.flat,fill_seq) Where fill_seq was a sequence 1/2 th size of data.flat, or data.point(data.flat,data=xyzcolor) Where the data is (x,y,color,x,y,color...) or ( (x,y,color),(x,y,color)...) Either one of these options would allow the low level C code to sequence through the point/color data quickly. Would this be tough to add (or can I already do it;->). I've done lot's of C and C++ but I haven't worked with Python extensions (yet?). Chuck __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree From fredrik at pythonware.com Tue Nov 18 17:04:29 2003 From: fredrik at pythonware.com (Fredrik Lundh) Date: Tue Nov 18 17:04:51 2003 Subject: [Image-SIG] Re: BitmapImage instanciation of an xbm References: Message-ID: Nathan Johnson wrote: > When I try to open an xbm image either from file or embedded in > python code(as shown below) the PIL says it can't identify the > image file. It seems like the BitmapImage class should be able > to recognize the standard xbm format. The reason I'm using the > PIL to open the xbm is because I need to resize the image. If > anybody knows a better way of opening a .xbm file and being able > to resize it, I'm open to suggestions. a quick look at the sources indicate that the PIL XBM decoder is a bit pickier than it needs to be; the first "#define" must be on the first line of the file. adding a backslash to the end of the BITMAP line should solve your problem: BITMAP = """\ #define basic_width 32 ... From nate0000000000000 at yahoo.com Tue Nov 18 23:33:42 2003 From: nate0000000000000 at yahoo.com (Nate Iverson) Date: Tue Nov 18 23:33:47 2003 Subject: [Image-SIG] Compilation problem on Mac OS X 10.2.8 Message-ID: <20031119043342.96205.qmail@web60509.mail.yahoo.com> I've compiled & installed python 2.3.2 (I need 2.3) (replaced python in /usr/bin/ with a symlink. Also installed numeric, PyObjC, and a few others. I'm having troubles installing the Imaging-1.1.4 (or 1.1.3) from source. I have libjpeg & freetype installed by fink & followed the instructions in the readme about: LDFLAGS="-L/sw/lib" CPPFLAGS="-I/sw/lib" ./configure and JPEGINCLUDE= /sw/include/ The first errors I run into follow in the make: rm -f libImaging.a ar cr libImaging.a Storage.o Access.o Except.o Antialias.o Bands.o Blend.o Chops.o Convert.o ConvertYCbCr.o Copy.o Crop.o Crc32.o Dib.o Draw.o Effects.o File.o Fill.o Filter.o Geometry.o GetBBox.o Histo.o Matrix.o Negative.o Offset.o Pack.o Palette.o Paste.o Point.o Quant.o QuantHash.o QuantHeap.o RankFilter.o Unpack.o UnpackYCC.o BitDecode.o EpsEncode.o FliDecode.o GifDecode.o GifEncode.o HexDecode.o JpegDecode.o JpegEncode.o LzwDecode.o MspDecode.o PackDecode.o PcdDecode.o PcxDecode.o PcxEncode.o RawDecode.o RawEncode.o SunRleDecode.o TgaRleDecode.o XbmDecode.o XbmEncode.o ZipDecode.o ZipEncode.o ranlib libImaging.a ranlib: file: libImaging.a(Dib.o) has no symbols gcc -o coretest coretest.o libImaging.a -lz -ljpeg -lm ld: can't locate file for: -ljpeg make: *** [coretest] Error 1 In a similar fashion I get failure from python setup.py build building '_imagingtk' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -IlibImaging -I/usr/local/include/python2.3 -c _imagingtk.c -o build/temp.darwin-6.8-Power_Macintosh-2.3/_imagingtk.o _imagingtk.c:20:16: tk.h: No such file or directory _imagingtk.c:23: parse error before '*' token _imagingtk.c:23: warning: function declaration isn't a prototype _imagingtk.c:31: parse error before "Tcl_Interp" _imagingtk.c:31: warning: no semicolon at end of struct or union _imagingtk.c:32: warning: type defaults to `int' in declaration of `TkappObject' _imagingtk.c:32: warning: data definition has no type or storage class _imagingtk.c: In function `_tkinit': _imagingtk.c:37: `Tcl_Interp' undeclared (first use in this function) _imagingtk.c:37: (Each undeclared identifier is reported only once _imagingtk.c:37: for each function it appears in.) _imagingtk.c:37: `interp' undeclared (first use in this function) _imagingtk.c:45: parse error before ')' token _imagingtk.c:50: `app' undeclared (first use in this function) _imagingtk.c:50: parse error before ')' token _imagingtk.c: At top level: _imagingtk.c:55: warning: type defaults to `int' in declaration of `TkImaging_Init' _imagingtk.c:55: warning: parameter names (without types) in function declaration _imagingtk.c:55: conflicting types for `TkImaging_Init' _imagingtk.c:23: previous declaration of `TkImaging_Init' _imagingtk.c:55: warning: data definition has no type or storage class _imagingtk.c:57: parse error before '&' token _imagingtk.c: In function `_tkinit': _imagingtk.c:45: warning: statement with no effect error: command 'gcc' failed with exit status 1 Am I missing some dependencies? any advice would be welcome -nate __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree From bob at redivi.com Wed Nov 19 01:20:09 2003 From: bob at redivi.com (Bob Ippolito) Date: Wed Nov 19 01:20:54 2003 Subject: [Image-SIG] Compilation problem on Mac OS X 10.2.8 In-Reply-To: <20031119043342.96205.qmail@web60509.mail.yahoo.com> References: <20031119043342.96205.qmail@web60509.mail.yahoo.com> Message-ID: <6D0341DF-1A58-11D8-B477-000A95686CD8@redivi.com> On Nov 18, 2003, at 11:33 PM, Nate Iverson wrote: > I've compiled & installed python 2.3.2 (I need 2.3) > (replaced python in /usr/bin/ with a symlink. You may want to consider just using the official MacPython 2.3.0 distribution ( http://homepages.cwi.nl/~jack/macpython/index.html ), there's a whole bunch of people using it (with all of the extensions you list) successfully. The official PackageManager repository has a version of PIL that supposedly works with Fink's libjpeg. You also may want to consider just turning Fink off. I don't use Fink (but have build libjpeg and freetype myself) and don't have these problems. Also don't replace stuff in /usr/bin, change your PATH. Upgrading that version of Python breaks OS X. Well, not *really* in 10.2.x, but 10.3.x uses Python for some system scripts related to printing and faxing that depend on the CoreGraphics module, which is not open source and is not available for anything other than the stock 2.3.0. It's just not a bright idea to mess with anything in /usr (other than local) or /System, those are Apple's directories and you should not touch them (if you like your computer to work). > Also installed numeric, PyObjC, and a few others. > I'm having troubles installing the Imaging-1.1.4 > (or 1.1.3) from source. > > I have libjpeg & freetype installed by fink & followed > the instructions in the readme about: > > LDFLAGS="-L/sw/lib" CPPFLAGS="-I/sw/lib" ./configure > > and > > JPEGINCLUDE= /sw/include/ > > > The first errors I run into follow in the make: > > gcc -o coretest coretest.o libImaging.a -lz -ljpeg > -lm > ld: can't locate file for: -ljpeg > make: *** [coretest] Error 1 It's not picking up those LDFLAGS.. maybe you have a cached configure or something? Try removing config.cache. My jpeg and freetype live in /usr/local and it finds them without having to specify any of the environment variables that you mention. > In a similar fashion I get failure from > > python setup.py build > > building '_imagingtk' extension Do you even need this? It's probably possible to get it to work (at least with tcltkaqua), but it never seemed worthwhile. -bob From fredrik at pythonware.com Wed Nov 19 08:06:37 2003 From: fredrik at pythonware.com (Fredrik Lundh) Date: Wed Nov 19 08:06:47 2003 Subject: [Image-SIG] Re: Plotting many point's with PIL References: <20031118190745.87074.qmail@web13906.mail.yahoo.com> Message-ID: Chuck Bass wrote: > Would this be tough to add (or can I already do it;->). I've done lot's of C and C++ but I > haven't worked with Python extensions (yet?). read chapter 1 in this document http://www.python.org/doc/2.3.2/ext/ext.html and then this note http://effbot.org/zone/pil-extending.htm and spend 30 minutes in your favourite editor, and you're done. From nate0000000000000 at yahoo.com Wed Nov 19 09:52:07 2003 From: nate0000000000000 at yahoo.com (Nate Iverson) Date: Wed Nov 19 09:52:17 2003 Subject: [Image-SIG] Compilation problem on Mac OS X 10.2.8 In-Reply-To: <6D0341DF-1A58-11D8-B477-000A95686CD8@redivi.com> Message-ID: <20031119145207.94568.qmail@web60510.mail.yahoo.com> > You may want to consider just using the official > MacPython 2.3.0 My eventual goal is to install the pygame package. I tried the MacPython installer and could install all the prerequisites.. but for some reason the new pygame (in the non-official list) requires the 10.3 installation of python. I poked around a little but couldn't find an upgrade from apple. I also tried some older / different install lists but things still didn't seem to be working correctly. > You also may want to consider just turning Fink off. > I don't use Fink > (but have build libjpeg and freetype myself) and > don't have these > problems. I'll try that. > Also don't replace stuff in /usr/bin, change your > PATH. Upgrading that > version of Python breaks OS X. I was a little careful here i only replaced: /usr/bin/python which was hard linked to: /usr/bin/python2.2 So I can go back to using apples python if i have problems. Maybe i'm having trouble because the install is looking for the wrong libraries for my python. I'll try compiling with python pointed at my binary rather than the link. > > > > I have libjpeg & freetype installed by fink & > followed > > the instructions in the readme about: > > > > LDFLAGS="-L/sw/lib" CPPFLAGS="-I/sw/lib" > ./configure > > > > and > > > > JPEGINCLUDE= /sw/include/ > > > > > > The first errors I run into follow in the make: > > > > gcc -o coretest coretest.o libImaging.a -lz -ljpeg > > -lm > > ld: can't locate file for: -ljpeg > > make: *** [coretest] Error 1 > > It's not picking up those LDFLAGS.. maybe you have a > cached configure > or something? Try removing config.cache. I'm pretty sure i removed config.cache but I'll make sure I do that on my next try. Think it's possible that this is related to apple's other linking problems like -no-cpp-precomp? thanks :-) -nate __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree From bob at redivi.com Wed Nov 19 10:07:52 2003 From: bob at redivi.com (Bob Ippolito) Date: Wed Nov 19 10:07:49 2003 Subject: [Image-SIG] Compilation problem on Mac OS X 10.2.8 In-Reply-To: <20031119145207.94568.qmail@web60510.mail.yahoo.com> References: <20031119145207.94568.qmail@web60510.mail.yahoo.com> Message-ID: <25D47FBA-1AA2-11D8-B7C4-000A95686CD8@redivi.com> On Nov 19, 2003, at 9:52 AM, Nate Iverson wrote: >> You may want to consider just using the official >> MacPython 2.3.0 > > My eventual goal is to install the pygame package. I > tried the MacPython installer and could install all > the prerequisites.. but for some reason the new pygame > (in the non-official list) requires the 10.3 > installation of python. I poked around a little but > couldn't find an upgrade from apple. I also tried some > older / different install lists but things still > didn't seem to be working correctly. That's actually my list. Sorry, I don't run 10.2 or support it anymore. You can try installing all the pygame dependencies from my old list, and then compile pygame yourself. There's not a whole lot of difference between pygame 1.5.6 and 1.6 anyways, so that's always an option. >> Also don't replace stuff in /usr/bin, change your >> PATH. Upgrading that >> version of Python breaks OS X. > > I was a little careful here i only replaced: > /usr/bin/python > which was hard linked to: > /usr/bin/python2.2 > So I can go back to using apples python if i have > problems. Maybe i'm having trouble because the install > > is looking for the wrong libraries for my python. > I'll try compiling with python pointed at my binary > rather than the link. I doubt that's your problem. Either way, it doesn't matter if you're careful or not, unless you work for Apple you are never ever supposed to touch /usr or /System. >>> I have libjpeg & freetype installed by fink & >> followed >>> the instructions in the readme about: >>> >>> LDFLAGS="-L/sw/lib" CPPFLAGS="-I/sw/lib" >> ./configure >>> >>> and >>> >>> JPEGINCLUDE= /sw/include/ >>> >>> >>> The first errors I run into follow in the make: >>> >>> gcc -o coretest coretest.o libImaging.a -lz -ljpeg >>> -lm >>> ld: can't locate file for: -ljpeg >>> make: *** [coretest] Error 1 >> >> It's not picking up those LDFLAGS.. maybe you have a >> cached configure >> or something? Try removing config.cache. > > I'm pretty sure i removed config.cache but I'll make > sure I do that on my next try. Think it's possible > that > this is related to apple's other linking problems > like -no-cpp-precomp? Nope, it's not in any way related (-no-cpp-precomp isn't a linker option anyway). -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/image-sig/attachments/20031119/3f60983a/smime.bin From fredrik at pythonware.com Wed Nov 19 10:11:10 2003 From: fredrik at pythonware.com (Fredrik Lundh) Date: Wed Nov 19 10:12:17 2003 Subject: [Image-SIG] Re: Plotting many point's with PIL References: <20031118190745.87074.qmail@web13906.mail.yahoo.com> Message-ID: > read chapter 1 in this document > http://www.python.org/doc/2.3.2/ext/ext.html > > and then this note > http://effbot.org/zone/pil-extending.htm > > and spend 30 minutes in your favourite editor, and you're done. btw, the only "hard" part is to write code to loop over Python sequences; see PIL's _imaging.c module for some examples. or look at PyPath_Flatten in PIL's path.c module. From astraw at insightscientific.com Wed Nov 19 17:38:14 2003 From: astraw at insightscientific.com (Andrew Straw) Date: Wed Nov 19 17:38:42 2003 Subject: [Image-SIG] Compilation problem on Mac OS X 10.2.8 In-Reply-To: <25D47FBA-1AA2-11D8-B7C4-000A95686CD8@redivi.com> Message-ID: <0FDD72FD-1AE1-11D8-B024-00039311EA24@insightscientific.com> On Thursday, Nov 20, 2003, at 01:37 Australia/Adelaide, Bob Ippolito wrote: > On Nov 19, 2003, at 9:52 AM, Nate Iverson wrote: > >>> You may want to consider just using the official >>> MacPython 2.3.0 >> >> My eventual goal is to install the pygame package. I >> tried the MacPython installer and could install all >> the prerequisites.. but for some reason the new pygame >> (in the non-official list) requires the 10.3 >> installation of python. I poked around a little but >> couldn't find an upgrade from apple. I also tried some >> older / different install lists but things still >> didn't seem to be working correctly. > > That's actually my list. Sorry, I don't run 10.2 or support it > anymore. You can try installing all the pygame dependencies from my > old list, and then compile pygame yourself. There's not a whole lot > of difference between pygame 1.5.6 and 1.6 anyways, so that's always > an option. AFAIK, the pygame in Bob's (now unsupported) database for 10.2 works great. Point the PackageManager from Jack's MacPython 2.3(.0) to Bob's old database: http://undefined.org/python/pimp/darwin-6.6-Power_Macintosh.plist and download away! Bob -- are you planning on keeping your 10.2 database online for a while? Cheers! Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 155 bytes Desc: not available Url : http://mail.python.org/pipermail/image-sig/attachments/20031120/9fabf0c7/attachment.bin From njriley at uiuc.edu Thu Nov 20 23:02:55 2003 From: njriley at uiuc.edu (Nicholas Riley) Date: Thu Nov 20 23:03:03 2003 Subject: [Image-SIG] PIL produces corrupt PDFs Message-ID: <20031121040255.GD34053@uiuc.edu> Hi, (Apologies to anyone on the reportlab-users list who gets two copies of this; I'm approaching this problem from both the 'producer' and 'consumer' sides in the hope of finding a solution quickly.) I'm writing a document management system which uses PIL to take scanned documents and make PDFs out of them. Using PIL is fast and easy, but the PDFs don't seem to be readable by anything other than Acrobat Reader. This is what I get from ReportLab's pageCatcher: Traceback (most recent call last): File "copy.py", line 7, in ? copyPages('d:\\pil.pdf', cvs) File "_p:rlextra\pageCatcher\pageCatcher.py", line 1242, in copyPages File "_p:rlextra\pageCatcher\pageCatcher.py", line 678, in parse File "_p:rlextra\pageCatcher\pageCatcher.py", line 784, in getindirectObject File "_p:rlextra\pageCatcher\pageCatcher.py", line 822, in gettrue ValueError: `endobj` keyword not found 1290 '5 0 obj\n<<\n/Length 3' And from Ghostscript: GS>(//brando/d$/pil.pdf) run Processing pages 1 through 1. Page 1 **** Warning: stream missing 'endstream'. **** Unknown operator: 'xref' **** Unknown operator: 'f' **** Unknown operator: 'n' **** Unknown operator: 'n' **** Unknown operator: 'n' **** Unknown operator: 'n' **** Unknown operator: 'n' **** Unknown operator: 'trailer' **** Unknown operator: 'startxref' **** Unknown operator: '%%EOF' Error: /stackunderflow in --pop-- Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval- - 2 %stopped_push --nostringval-- --nostringval-- %loop_continue 2 3 %oparray_pop --nostringval-- --nostringval-- false 1 %stopped_pus h .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopp ed_push --nostringval-- 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- 2 1 1 --nostringval-- %for_pos_int_co ntinue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue 0 --nostringval-- %repeat_continue Dictionary stack: --dict:1105/1123(ro)(G)-- --dict:0/20(G)-- --dict:74/200(L)-- --dict:74 /200(L)-- --dict:104/127(ro)(G)-- --dict:232/347(ro)(G)-- --dict:20/24(L)- - --dict:4/6(L)-- --dict:20/20(L)-- Current allocation mode is local Current file position is 26 when parsing a simple PDF generated as follows: import Image Image.new('RGB', (100,100)).save('d:\\pil.pdf') Since PIL can't read back its own PDFs, I've got several hundred pseudo-PDFs stuck in this format and I can't get them out. Any ideas would be gratefully appreciated. Thanks, -- =Nicholas Riley | From pw_lists at slinkp.com Fri Nov 21 15:06:07 2003 From: pw_lists at slinkp.com (Paul Winkler) Date: Fri Nov 21 15:10:37 2003 Subject: [Image-SIG] Corrupted GIF output when dimensions are small Message-ID: <20031121200607.GC1702@slinkp.com> I can repeatably generate corrupted GIFs by giving very small dimensions. PNG works fine at the same sizes. Demonstration follows, simplified a bit from my real app. I've run this with both python 2.1.3 and 2.2.3, with the same results. import PIL.Image, PIL.ImageDraw class maker: def _normalize_color(self, colorstring): colorstring = colorstring.strip() if colorstring[0] == '#': colorstring = colorstring[1:] # for some reason, PIL numeric colors seem to be 0xBBGGRR # instead of 0xRRGGBB colorstring = colorstring[-2:] + colorstring[2:4] + colorstring[:2] color = int(colorstring, 16) return color def generateImages(self, id='bkg.gif', width=20, height=2, left_color="#FFCC00", right_color="#3366CC", bkg_color="#FFFFFF"): bkg_color = self._normalize_color(bkg_color) bkg_img = PIL.Image.new(mode='RGB', size=(width, height), color=bkg_color) draw = PIL.ImageDraw.Draw(bkg_img) draw.line(((0, 0), (0, height)), fill=left_color) draw.line(((width-1, 0), (width-1, height)), fill=right_color) # Indexed, no dither. bkg_img = bkg_img.convert('P', dither=PIL.Image.NONE, palette=PIL.Image.ADAPTIVE) fol = '/tmp' self._save_image(fol, id, 'background', bkg_img) del(draw) def _save_image(self, folder, id, dummy, img): import os.path where = os.path.join(folder, id) img.save(where) if __name__ == '__main__': m = maker() color = '#FFFFFF' m.generateImages(id='bkg_white.gif', bkg_color=color) #BAD m.generateImages(id='bkg_white.png', bkg_color=color) #OK m.generateImages(id='bkg_white2.gif', bkg_color=color, height=5) # OK ... anything over 5 is OK The 'bad' image, bkg_white.gif, is bad in several ways: 1) Gimp displays it but the vertical lines at left and right do not extend down the whole height of the image as they should. They look fine in the other two images. (I wondered if i should be drawing the lines from 0 to height-1 instead of 0 to height, which seems more sensible to me, and consistent with the treatment of width; but it doesn't do what I expect - that just makes the vertical lines stop one pixel short of the edge in all output formats.) 2) Gimp complains on loading: GIF: too much input data, ignoring extra... GIF: bogus character 0x00, ignoring 3) imagemagick's "convert" refuses to convert it: $ convert /tmp/bkg_white.gif /tmp/bkg_white_converted.gif convert: Corrupt GIF image (/tmp/bkg_white.gif). It's odd that increasing the height of the image above 5 fixes the gif. Further experimentation suggests that I get bad output with the above method for ANY gif of height < 5 OR width < 2. Of course, my application is required to generate a 1200x2 gif :-P If it were up to me I'd just use PNG, but it's not up to me... Any idea how to fix this? The GIF stuff for PIL appears to all be in C and I have no idea where to start. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's AMAZING SHOCK COW! (random hero from isometric.spaceninja.com) From nate0000000000000 at yahoo.com Sat Nov 22 00:34:08 2003 From: nate0000000000000 at yahoo.com (Nate Iverson) Date: Sat Nov 22 00:34:13 2003 Subject: [Image-SIG] Using MacPython In-Reply-To: <0FDD72FD-1AE1-11D8-B024-00039311EA24@insightscientific.com> Message-ID: <20031122053408.69704.qmail@web60507.mail.yahoo.com> Now that i've finished my exam. I've had a chance to look at MacPython again. It's far nicer than my first assessment led me to believe. Anyway, It looks like the only things I haven't gotten working are related to my libjpeg & freetype being installed by fink. I plan to compile /install these tonight. Thanks for your help bob. -nate __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree From njriley at uiuc.edu Sat Nov 22 11:48:55 2003 From: njriley at uiuc.edu (Nicholas Riley) Date: Sat Nov 22 11:49:07 2003 Subject: [Image-SIG] [PATCH] PIL produces corrupt PDFs Message-ID: I took a closer look at the PDF specification and the error messages I was getting, and it proved to be relatively trivial to fix PIL to generate correct PDFs. The following code will (somewhat inefficiently) repair an incorrectly generated PDF. import re def fixImage(image): """PIL PDF driver 0.2 creates corrupted PDFs which neither pageCatcher nor Ghostscript can understand. Returns a repaired version of such a PDF.""" prefix = '%PDF-1.2\n% created by PIL PDF driver 0.2\n' if not image[:len(prefix)] == prefix: # no fixing necessary return image else: if type(image) != type(''): # may be a buffer image = str(image) inUnclosedObj = 0 inUnclosedStream = 0 lines = image.split('\n') fixed = '' xref = [0] for line in lines: if line == '% created by PIL PDF driver 0.2': line = '% created by PIL PDF driver 0.2, repaired' if line == ('xref'): break if re.match('[0-9]+ 0 obj', line): xref.append(len(fixed)) elif line == 'endobj' and inUnclosedStream: line = 'endstream\n' + line inUnclosedStream = 0 fixed = '%s%s\n' % (fixed, line) if line == '/Contents 5 0 R': inUnclosedObj = 1 elif inUnclosedObj and line == '>>': fixed += 'endobj\n' inUnclosedObj = 0 elif re.match('q [0-9]+ 0 0 [0-9]+ 0 0 cm /image Do Q', line): inUnclosedStream = 1 startxref = len(fixed) fixed += ("xref\n0 %d\n0000000000 65535 f \n" % len(xref)) for x in xref[1:]: fixed += "%010d 00000 n \n" % x fixed += "trailer\n<<\n/Size %d\n/Root 1 0 R\n>>\n" % len(xref) fixed += "startxref\n%d\n%%%%EOF\n" % startxref return fixed Since nobody responded to my post I can only assume nobody else uses PIL's PDF generation with anything but Acrobat, but in case anyone else needs it in future, a patch against PIL 1.1.4 is attached. -------------- next part -------------- A non-text attachment was scrubbed... Name: pil-pdf-fix.patch Type: application/octet-stream Size: 1817 bytes Desc: not available Url : http://mail.python.org/pipermail/image-sig/attachments/20031122/eb9ddb9e/pil-pdf-fix.obj -------------- next part -------------- -- Nicholas Riley From sivachandra_br at yahoo.com Thu Nov 27 05:40:42 2003 From: sivachandra_br at yahoo.com (Siva Chandra) Date: Thu Nov 27 05:40:45 2003 Subject: [Image-SIG] Tkinter Scroll Bar Widget Message-ID: <20031127104042.41195.qmail@web40712.mail.yahoo.com> Hello, I have been using Tkinter for some time but now I am having to use a scroll bar for my image processing project. Can I get complete info on using the scroll bar widget. I am unable to control the lenght of the scroll and the tutorial isn't complete on this. Currently I am simulating a scroll bar using the scale widgets which is very-very slow. thanx ===== Siva Chandra B-Tech, Electrical Engineering, IIT Madras. Currently pursuing MS by research at IIIT, Hyderabad visit www.geocities.com/sivachandra_br __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ From schutte at fel.tno.nl Thu Nov 27 11:20:46 2003 From: schutte at fel.tno.nl (K Schutte) Date: Thu Nov 27 11:21:05 2003 Subject: [Image-SIG] Tkinter Scroll Bar Widget References: <20031127104042.41195.qmail@web40712.mail.yahoo.com> Message-ID: <3FC6245E.9777C3D@fel.tno.nl> Siva, Without sending you our complete application (which is proprietary), see below the excerpt which seems to handle the scrollbars. I know it did take quite some effort to get it working. Sending back any improvements is appreciated! Klamer # # The Python Imaging Library # $Id: viewer.py,v 1.6 2003/10/28 10:51:45 kscp1 Exp $ # from Tkinter import * import Image, ImageTk, jfloatimage, jfloatimagec #, Pmw import time, Queue import threading, sys, os # # an image viewer class UI(Canvas): def __init__(self, master, im, scroll = None): if im.mode == "1": # bitmap image self.image = ImageTk.BitmapImage(im, foreground="white") Label.__init__(self, master, image=self.image, bg="black", bd=0) else: # photo image #scx.grid(row=1,column=0,sticky=E+W) (w,h)=im.size Canvas.__init__(self,master, height=h,width=w,borderwidth=0) if (w > 512) or (h > 512) or (scroll != None): self.scroll = 1 scy=Scrollbar(master) scy.pack(side=RIGHT,fill=Y) scx=Scrollbar(master,orient=HORIZONTAL) scx.pack(side=BOTTOM,fill=X) if (scroll != None): self.config(xscrollcommand=scx.set, yscrollcommand=scy.set, scrollregion=(0,0,w,h), height=512,width=512) else: self.config(xscrollcommand=scx.set, yscrollcommand=scy.set, scrollregion=(0,0,w,h)) scx.config(command=self.xview) scy.config(command=self.yview) #self.grid(row=0,column=0,sticky=N+S+E+W) self.image = ImageTk.PhotoImage(im) self.canvasImage=self.create_image(0,0,image=self.image,anchor=NW) Siva Chandra wrote: > > Hello, > > I have been using Tkinter for some time but now I am > having to use a scroll bar for my image processing > project. Can I get complete info on using the scroll > bar widget. I am unable to control the lenght of the > scroll and the tutorial isn't complete on this. > Currently I am simulating a scroll bar using the scale > widgets which is very-very slow. > > thanx > > ===== > Siva Chandra > B-Tech, Electrical Engineering, > IIT Madras. > Currently pursuing MS by research at IIIT, Hyderabad > visit www.geocities.com/sivachandra_br > > __________________________________ > Do you Yahoo!? > Free Pop-Up Blocker - Get it now > http://companion.yahoo.com/ > > _______________________________________________ > Image-SIG maillist - Image-SIG@python.org > http://mail.python.org/mailman/listinfo/image-sig -- Klamer Schutte, E-mail: Schutte@fel.tno.nl Intelligent Cameras, TNO Physics and Electronics Laboratory Tel: +31-70-3740469 -- Fax: +31-70-3740654 -- Mobile: +31-6-51316671 -- ------------------------------------------------------------------------------ The disclaimer that applies to e-mail from TNO Physics and Electronics Laboratory can be found on: http://www.tno.nl/disclaimer/email.html ------------------------------------------------------------------------------ From fredrik at pythonware.com Thu Nov 27 12:07:59 2003 From: fredrik at pythonware.com (Fredrik Lundh) Date: Thu Nov 27 12:08:15 2003 Subject: [Image-SIG] Re: Tkinter Scroll Bar Widget References: <20031127104042.41195.qmail@web40712.mail.yahoo.com> Message-ID: Siva Chandra wrote: > I have been using Tkinter for some time but now I am > having to use a scroll bar for my image processing > project. Can I get complete info on using the scroll > bar widget. I am unable to control the lenght of the > scroll and the tutorial isn't complete on this. this might help: http://effbot.org/zone/tkinter-scrollbar-patterns.htm note that tkinter questions are not really appropriate for this mailing list; I suggest using a general Python forum for future questions. see http://www.python.org/Help.html for a list of resources (look under "got a python problem or question")